diff options
author | Luigi Rizzo <luigi@FreeBSD.org> | 2008-12-03 18:36:59 +0000 |
---|---|---|
committer | Luigi Rizzo <luigi@FreeBSD.org> | 2008-12-03 18:36:59 +0000 |
commit | 64c8fef580df8cb8a9dbab10ad04b8e427609f0d (patch) | |
tree | c4b9b5c278df89601572732efb3483d2b101edfd /sbin/newfs/newfs.h | |
parent | b87d1601b6605929ba3f800f45db4f426d3b3843 (diff) | |
download | src-64c8fef580df8cb8a9dbab10ad04b8e427609f0d.tar.gz src-64c8fef580df8cb8a9dbab10ad04b8e427609f0d.zip |
Notes
Diffstat (limited to 'sbin/newfs/newfs.h')
-rw-r--r-- | sbin/newfs/newfs.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sbin/newfs/newfs.h b/sbin/newfs/newfs.h index 5c428c412ecf..0d7cb62379dc 100644 --- a/sbin/newfs/newfs.h +++ b/sbin/newfs/newfs.h @@ -70,4 +70,20 @@ extern int avgfilesperdir; /* expected number of files per directory */ extern u_char *volumelabel; /* volume label for filesystem */ extern struct uufsd disk; /* libufs disk structure */ +/* + * To override a limitation in libufs, export the offset (in sectors) of the + * partition on the underlying media (file or disk). The value is used as + * an offset for all accesses to the media through bread(), which is only + * invoked directly in this program. + * For bwrite() we need a different approach, namely override the library + * version with one defined here. This is because bwrite() is called also + * by the library function sbwrite() which we cannot intercept nor want to + * rewrite. As a consequence, the internal version of bwrite() adds the + * partition offset itself when calling the underlying function, pwrite(). + * + * XXX This info really ought to go into the struct uufsd, at which point + * we can remove the above hack. + */ +extern ufs2_daddr_t part_ofs; /* partition offset in blocks */ + void mkfs (struct partition *, char *); |