Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168115058
D15064.id43380.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15064.id43380.diff
View Options
Index: stand/libsa/ufs.c
===================================================================
--- stand/libsa/ufs.c
+++ stand/libsa/ufs.c
@@ -124,6 +124,7 @@
ufs2_daddr_t f_buf_blkno; /* block number of data block */
char *f_buf; /* buffer for data block */
size_t f_buf_size; /* size of data block */
+ int f_inumber; /* inumber */
};
#define DIP(fp, field) \
((fp)->f_fs->fs_magic == FS_UFS1_MAGIC ? \
@@ -190,6 +191,7 @@
fp->f_buf_blkno = -1;
}
fp->f_seekp = 0;
+ fp->f_inumber = inumber;
out:
free(buf);
return (rc);
@@ -836,6 +838,20 @@
sb->st_uid = DIP(fp, di_uid);
sb->st_gid = DIP(fp, di_gid);
sb->st_size = DIP(fp, di_size);
+ sb->st_mtime = DIP(fp, di_mtime);
+ /*
+ * The items below are ufs specific!
+ * Other fs types will need their own solution
+ * if these fields are needed.
+ */
+ sb->st_ino = fp->f_inumber;
+ /*
+ * We need something to differentiate devs.
+ * fs_id is unique but 64bit, we xor the two
+ * halves to squeeze it into 32bits.
+ */
+ sb->st_dev = (dev_t)(fp->f_fs->fs_id[0] ^ fp->f_fs->fs_id[1]);
+
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 27, 11:13 AM (18 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37378186
Default Alt Text
D15064.id43380.diff (1 KB)
Attached To
Mode
D15064: Add st_ino etc to libsa ufs_stat
Attached
Detach File
Event Timeline
Log In to Comment