diff options
-rw-r--r-- | usr.sbin/makefs/README | 6 | ||||
-rw-r--r-- | usr.sbin/makefs/cd9660.c | 8 | ||||
-rw-r--r-- | usr.sbin/makefs/cd9660.h | 6 | ||||
-rw-r--r-- | usr.sbin/makefs/makefs.c | 10 | ||||
-rw-r--r-- | usr.sbin/makefs/makefs.h | 6 | ||||
-rw-r--r-- | usr.sbin/makefs/msdos.c | 12 | ||||
-rw-r--r-- | usr.sbin/makefs/walk.c | 8 |
7 files changed, 28 insertions, 28 deletions
diff --git a/usr.sbin/makefs/README b/usr.sbin/makefs/README index a532ed07541..947d6f7cff7 100644 --- a/usr.sbin/makefs/README +++ b/usr.sbin/makefs/README @@ -1,4 +1,4 @@ -$OpenBSD: README,v 1.2 2016/10/16 20:26:56 natano Exp $ +$OpenBSD: README,v 1.3 2016/12/17 16:12:15 krw Exp $ $NetBSD: README,v 1.7 2015/01/12 19:50:47 christos Exp $ makefs - build a file system image from a directory tree @@ -66,7 +66,7 @@ The main program will: probably be a similar tree to what mtree(8) uses internally; a linked list of entries per directory with a child pointer to children of directories. ".." won't be stored in the list; - the fs-specific tree walker should add this if required by the fs. + the fs-specific tree walker should add this if required by the fs. this builder have the smarts to handle hard links correctly. - Call an fs-specific routine to build the image based on the data structures. @@ -85,7 +85,7 @@ Each fs-specific module should have the following external interfaces: make_fs take the data structures representing the directory tree and fs parameters, validate that the parameters are valid - (e.g, the requested image will be large enough), + (e.g, the requested image will be large enough), create the image, and populate the image diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index 0d4abd5033d..c7b768bddb3 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660.c,v 1.18 2016/11/26 18:57:25 natano Exp $ */ +/* $OpenBSD: cd9660.c,v 1.19 2016/12/17 16:12:15 krw Exp $ */ /* $NetBSD: cd9660.c,v 1.53 2016/11/25 23:02:44 christos Exp $ */ /* @@ -753,7 +753,7 @@ cd9660_translate_node(iso9660_disk *diskStructure, fsnode *node, * @param const char * The first file name * @param const char * The second file name * @returns : -1 if first is less than second, 0 if they are the same, 1 if - * the second is greater than the first + * the second is greater than the first */ static int cd9660_compare_filename(const char *first, const char *second) @@ -1568,7 +1568,7 @@ cd9660_level2_convert_filename(iso9660_disk *diskStructure, const char *oldname, *newname++ = *oldname; else if (diskStructure->allow_multidot && *oldname == '.') { - *newname++ = '.'; + *newname++ = '.'; } else { *newname++ = '_'; } @@ -1704,7 +1704,7 @@ cd9660_compute_offsets(iso9660_disk *diskStructure, cd9660node *node, cd9660_compute_record_size(diskStructure, child); if ((cd9660_compute_record_size(diskStructure, child) + current_sector_usage) >= - diskStructure->sectorSize) { + diskStructure->sectorSize) { current_sector_usage = 0; node->fileSectorsUsed++; } diff --git a/usr.sbin/makefs/cd9660.h b/usr.sbin/makefs/cd9660.h index 96d12bf4268..3ab3dc7fed4 100644 --- a/usr.sbin/makefs/cd9660.h +++ b/usr.sbin/makefs/cd9660.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660.h,v 1.11 2016/10/26 15:31:13 natano Exp $ */ +/* $OpenBSD: cd9660.h,v 1.12 2016/12/17 16:12:15 krw Exp $ */ /* $NetBSD: cd9660.h,v 1.21 2015/12/24 15:52:37 christos Exp $ */ /* @@ -299,8 +299,8 @@ void cd9660_721(uint16_t, unsigned char *); void cd9660_731(uint32_t, unsigned char *); void cd9660_722(uint16_t, unsigned char *); void cd9660_732(uint32_t, unsigned char *); -void cd9660_bothendian_dword(uint32_t dw, unsigned char *); -void cd9660_bothendian_word(uint16_t dw, unsigned char *); +void cd9660_bothendian_dword(uint32_t dw, unsigned char *); +void cd9660_bothendian_word(uint16_t dw, unsigned char *); void cd9660_set_date(char *, time_t); void cd9660_time_8426(unsigned char *, time_t); void cd9660_time_915(unsigned char *, time_t); diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c index 60a108ce55f..8946e424926 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makefs.c,v 1.18 2016/11/08 09:43:59 mestre Exp $ */ +/* $OpenBSD: makefs.c,v 1.19 2016/12/17 16:12:15 krw Exp $ */ /* $NetBSD: makefs.c,v 1.53 2015/11/27 15:10:32 joerg Exp $ */ /* @@ -85,7 +85,7 @@ main(int argc, char *argv[]) fstype_t *fstype; fsinfo_t fsoptions; fsnode *root; - int ch, len; + int ch, len; if ((fstype = get_fstype(DEFAULT_FSTYPE)) == NULL) errx(1, "Unknown default fs type `%s'.", DEFAULT_FSTYPE); @@ -144,10 +144,10 @@ main(int argc, char *argv[]) break; case 'O': - fsoptions.offset = + fsoptions.offset = strsuftoll("offset", optarg, 0LL, LLONG_MAX); break; - + case 'o': { char *p; @@ -290,7 +290,7 @@ static fstype_t * get_fstype(const char *type) { int i; - + for (i = 0; fstypes[i].type != NULL; i++) if (strcmp(fstypes[i].type, type) == 0) return (&fstypes[i]); diff --git a/usr.sbin/makefs/makefs.h b/usr.sbin/makefs/makefs.h index 617943acc38..beb6fd6f259 100644 --- a/usr.sbin/makefs/makefs.h +++ b/usr.sbin/makefs/makefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: makefs.h,v 1.11 2016/10/26 07:53:47 natano Exp $ */ +/* $OpenBSD: makefs.h,v 1.12 2016/12/17 16:12:15 krw Exp $ */ /* $NetBSD: makefs.h,v 1.36 2015/11/25 00:48:49 christos Exp $ */ /* @@ -47,7 +47,7 @@ * a component of the tree; contains a filename, a pointer to * fsinode, optional symlink name, and tree pointers * - * fsinode - + * fsinode - * equivalent to an inode, containing target file system inode number, * refcount (nlink), and stat buffer * @@ -55,7 +55,7 @@ * * name "." "bin" "netbsd" * type S_IFDIR S_IFDIR S_IFREG - * next > > NULL + * next > > NULL * parent NULL NULL NULL * child NULL v * diff --git a/usr.sbin/makefs/msdos.c b/usr.sbin/makefs/msdos.c index 75a0072b477..a60af9adaa5 100644 --- a/usr.sbin/makefs/msdos.c +++ b/usr.sbin/makefs/msdos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdos.c,v 1.9 2016/10/26 07:53:47 natano Exp $ */ +/* $OpenBSD: msdos.c,v 1.10 2016/12/17 16:12:15 krw Exp $ */ /* $NetBSD: msdos.c,v 1.16 2016/01/30 09:59:27 mlelstv Exp $ */ /*- @@ -52,7 +52,7 @@ msdos_prep_opts(fsinfo_t *fsopts) { struct msdos_options *msdos_opt = ecalloc(1, sizeof(*msdos_opt)); const option_t msdos_options[] = { -#define AOPT(_type, _name, _min) { \ +#define AOPT(_type, _name, _min) { \ .name = # _name, \ .type = _min == -1 ? OPT_STRPTR : \ (_min == -2 ? OPT_BOOL : \ @@ -66,7 +66,7 @@ msdos_prep_opts(fsinfo_t *fsopts) (sizeof(_type) == 4 ? 0xffffffff : 0xffffffffffffffffLL)), \ }, ALLOPTS -#undef AOPT +#undef AOPT { .name = NULL } }; @@ -134,7 +134,7 @@ msdos_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts) fsopts->sectorsize = msdos_opt->bytes_per_sector; } else if (fsopts->sectorsize != msdos_opt->bytes_per_sector) { err(1, "inconsistent sectorsize -S %u" - "!= -o bytes_per_sector %u", + "!= -o bytes_per_sector %u", fsopts->sectorsize, msdos_opt->bytes_per_sector); } @@ -171,8 +171,8 @@ msdos_populate_dir(const char *path, struct denode *dir, fsnode *root, assert(dir != NULL); assert(root != NULL); - assert(fsopts != NULL); - + assert(fsopts != NULL); + for (cur = root->next; cur != NULL; cur = cur->next) { if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path, cur->name) >= sizeof(pbuf)) { diff --git a/usr.sbin/makefs/walk.c b/usr.sbin/makefs/walk.c index be737a97946..e8a59ecc64a 100644 --- a/usr.sbin/makefs/walk.c +++ b/usr.sbin/makefs/walk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: walk.c,v 1.8 2016/10/22 19:20:36 natano Exp $ */ +/* $OpenBSD: walk.c,v 1.9 2016/12/17 16:12:15 krw Exp $ */ /* $NetBSD: walk.c,v 1.29 2015/11/25 00:48:49 christos Exp $ */ /* @@ -297,7 +297,7 @@ inode_type(mode_t mode) * return pointer to fsinode matching `entry's st_ino & st_dev if it exists, * otherwise add `entry' to table and return NULL */ -/* This was borrowed from du.c and tweaked to keep an fsnode +/* This was borrowed from du.c and tweaked to keep an fsnode * pointer instead. -- dbj@netbsd.org */ static fsinode * @@ -316,7 +316,7 @@ link_check(fsinode *entry) */ const uint64_t HTCONST = 11400714819323198485ULL; const int HTBITS = 64; - + /* Never store zero in hashtable */ assert(entry); @@ -351,7 +351,7 @@ link_check(fsinode *entry) tmp *= HTCONST; h = tmp >> (HTBITS - htshift); h2 = 1 | ( tmp >> (HTBITS - (htshift<<1) - 1)); /* must be odd */ - + /* open address hashtable search with double hash probing */ while (htable[h].data) { if ((htable[h].data->st.st_ino == entry->st.st_ino) && |