Page MenuHomeFreeBSD

D39443.diff
No OneTemporary

D39443.diff

diff --git a/usr.sbin/makefs/cd9660.h b/usr.sbin/makefs/cd9660.h
--- a/usr.sbin/makefs/cd9660.h
+++ b/usr.sbin/makefs/cd9660.h
@@ -325,10 +325,10 @@
int cd9660_write_boot(iso9660_disk *, FILE *);
int cd9660_add_boot_disk(iso9660_disk *, const char *);
int cd9660_eltorito_add_boot_option(iso9660_disk *, const char *,
- const char *);
+ const char *);
int cd9660_setup_boot(iso9660_disk *, int);
int cd9660_setup_boot_volume_descriptor(iso9660_disk *,
- volume_descriptor *);
+ volume_descriptor *);
/*** Write Functions ***/
diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c
--- a/usr.sbin/makefs/cd9660.c
+++ b/usr.sbin/makefs/cd9660.c
@@ -573,7 +573,7 @@
/* LE first, then BE */
diskStructure->primaryLittleEndianTableSector = firstAvailableSector;
diskStructure->primaryBigEndianTableSector =
- diskStructure->primaryLittleEndianTableSector + pathTableSectors;
+ diskStructure->primaryLittleEndianTableSector + pathTableSectors;
/* Set the secondary ones to -1, not going to use them for now */
diskStructure->secondaryBigEndianTableSector = -1;
@@ -592,7 +592,7 @@
totalSpace = cd9660_compute_offsets(diskStructure, real_root, startoffset);
diskStructure->totalSectors = diskStructure->dataFirstSector +
- CD9660_BLOCKS(diskStructure->sectorSize, totalSpace);
+ CD9660_BLOCKS(diskStructure->sectorSize, totalSpace);
/* Disabled until pass 1 is done */
if (diskStructure->rock_ridge_enabled) {
@@ -600,7 +600,7 @@
diskStructure->totalSectors;
diskStructure->totalSectors +=
CD9660_BLOCKS(diskStructure->sectorSize,
- diskStructure->susp_continuation_area_size);
+ diskStructure->susp_continuation_area_size);
cd9660_susp_finalize(diskStructure, diskStructure->rootNode);
}
@@ -654,7 +654,7 @@
/* root should be a fixed size of 34 bytes since it has no name */
memcpy(diskStructure->primaryDescriptor.root_directory_record,
- diskStructure->rootNode->dot_record->isoDirRecord, 34);
+ diskStructure->rootNode->dot_record->isoDirRecord, 34);
/* In RRIP, this might be longer than 34 */
diskStructure->primaryDescriptor.root_directory_record[0] = 34;
@@ -666,17 +666,17 @@
(unsigned char *)diskStructure->primaryDescriptor.volume_set_size);
cd9660_bothendian_word(1,
(unsigned char *)
- diskStructure->primaryDescriptor.volume_sequence_number);
+ diskStructure->primaryDescriptor.volume_sequence_number);
cd9660_bothendian_word(diskStructure->sectorSize,
(unsigned char *)
- diskStructure->primaryDescriptor.logical_block_size);
+ diskStructure->primaryDescriptor.logical_block_size);
cd9660_bothendian_dword(diskStructure->pathTableLength,
(unsigned char *)diskStructure->primaryDescriptor.path_table_size);
cd9660_731(diskStructure->primaryLittleEndianTableSector,
- (u_char *)diskStructure->primaryDescriptor.type_l_path_table);
+ (u_char *)diskStructure->primaryDescriptor.type_l_path_table);
cd9660_732(diskStructure->primaryBigEndianTableSector,
- (u_char *)diskStructure->primaryDescriptor.type_m_path_table);
+ (u_char *)diskStructure->primaryDescriptor.type_m_path_table);
diskStructure->primaryDescriptor.file_structure_version[0] = 1;
@@ -694,9 +694,9 @@
cd9660_pad_string_spaces(
diskStructure->primaryDescriptor.copyright_file_id, 37);
cd9660_pad_string_spaces(
- diskStructure->primaryDescriptor.abstract_file_id, 37);
+ diskStructure->primaryDescriptor.abstract_file_id, 37);
cd9660_pad_string_spaces(
- diskStructure->primaryDescriptor.bibliographic_file_id, 37);
+ diskStructure->primaryDescriptor.bibliographic_file_id, 37);
/* Setup dates */
cd9660_time_8426(
@@ -724,8 +724,7 @@
static void
cd9660_populate_iso_dir_record(struct _iso_directory_record_cd9660 *record,
- u_char ext_attr_length, u_char flags,
- u_char name_len, const char * name)
+ u_char ext_attr_length, u_char flags, u_char name_len, const char * name)
{
record->ext_attr_length[0] = ext_attr_length;
record->flags[0] = ISO_FLAG_CLEAR | flags;
@@ -984,11 +983,11 @@
return;
compare = cd9660_compare_filename(cn_new->isoDirRecord->name,
- cn->isoDirRecord->name);
+ cn->isoDirRecord->name);
if (compare == 0)
compare = cd9660_compare_filename(cn_new->node->name,
- cn->node->name);
+ cn->node->name);
if (compare < 0)
break;
@@ -1019,7 +1018,7 @@
for (iter = TAILQ_FIRST(&colliding->cn_children);
iter != NULL && (next = TAILQ_NEXT(iter, cn_next_child)) != NULL;) {
if (strcmp(iter->isoDirRecord->name,
- next->isoDirRecord->name) != 0) {
+ next->isoDirRecord->name) != 0) {
iter = TAILQ_NEXT(iter, cn_next_child);
continue;
}
@@ -1203,7 +1202,7 @@
if ((next = TAILQ_NEXT(cn, cn_next_child)) == NULL)
return;
else if (strcmp(next->isoDirRecord->name,
- cn->isoDirRecord->name) >= 0)
+ cn->isoDirRecord->name) >= 0)
continue;
TAILQ_REMOVE(&node->cn_children, next, cn_next_child);
TAILQ_INSERT_BEFORE(cn, next, cn_next_child);
@@ -1218,8 +1217,7 @@
int count = 0;
cd9660node *iter, *next;
- for (iter = copy;
- (next = TAILQ_NEXT(iter, cn_next_child)) != NULL;
+ for (iter = copy; (next = TAILQ_NEXT(iter, cn_next_child)) != NULL;
iter = next) {
if (cd9660_compare_filename(iter->isoDirRecord->name,
next->isoDirRecord->name) == 0)
@@ -1358,7 +1356,7 @@
/* Test for an empty directory - makefs still gives us the . record */
if ((S_ISDIR(root->type)) && (root->name[0] == '.')
- && (root->name[1] == '\0')) {
+ && (root->name[1] == '\0')) {
root = root->next;
if (root == NULL)
return;
@@ -1398,14 +1396,14 @@
*/
if (level == 8) {
if ((!diskStructure->allow_deep_trees) &&
- (!diskStructure->rock_ridge_enabled)) {
+ (!diskStructure->rock_ridge_enabled)) {
warnx("error: found entry "
"with depth greater "
"than 8.");
(*error) = 1;
return;
} else if (diskStructure->
- rock_ridge_enabled) {
+ rock_ridge_enabled) {
working_level = 3;
/*
* Moved directory is actually
@@ -1414,12 +1412,11 @@
this_node->level =
working_level - 1;
if (cd9660_rrip_move_directory(
- diskStructure,
- this_node) == NULL) {
+ diskStructure, this_node) ==
+ NULL) {
warnx("Failure in "
- "cd9660_rrip_"
- "move_directory"
- );
+ "cd9660_rrip_"
+ "move_directory");
(*error) = 1;
return;
}
@@ -1430,9 +1427,9 @@
/* Do the recursive call on the children */
if (iterator->child != NULL) {
cd9660_convert_structure(diskStructure,
- iterator->child, this_node,
- working_level,
- numDirectories, error);
+ iterator->child, this_node,
+ working_level, numDirectories,
+ error);
if ((*error) == 1) {
warnx("%s: Error on recursive "
@@ -1545,10 +1542,10 @@
free(n);
/* Update the size */
- pathTableSize += ISO_PATHTABLE_ENTRY_BASESIZE
- + dirNode->isoDirRecord->name_len[0]+
- (dirNode->isoDirRecord->name_len[0] % 2 == 0 ? 0 : 1);
- /* includes the padding bit */
+ pathTableSize += ISO_PATHTABLE_ENTRY_BASESIZE +
+ dirNode->isoDirRecord->name_len[0] +
+ (dirNode->isoDirRecord->name_len[0] % 2 == 0 ? 0 : 1);
+ /* includes the padding bit */
dirNode->ptnumber=counter;
if (dirNode != last) {
@@ -1564,8 +1561,7 @@
* table.
*/
if ((cn->type != CD9660_TYPE_DOT)
- && (cn->type != CD9660_TYPE_DOTDOT)) {
-
+ && (cn->type != CD9660_TYPE_DOTDOT)) {
if (S_ISDIR(cn->node->type)) {
PTQUEUE_NEW(n, ptq_entry, -1, cn);
TAILQ_INSERT_TAIL(&pt_head, n, ptq);
@@ -1637,8 +1633,8 @@
if (islower((unsigned char)*oldname))
*newname++ = toupper((unsigned char)*oldname);
- else if (isupper((unsigned char)*oldname)
- || isdigit((unsigned char)*oldname))
+ else if (isupper((unsigned char)*oldname) ||
+ isdigit((unsigned char)*oldname))
*newname++ = *oldname;
else
*newname++ = '_';
@@ -1851,8 +1847,7 @@
node->fileDataLength +=
cd9660_compute_record_size(diskStructure, child);
if ((cd9660_compute_record_size(diskStructure, child) +
- current_sector_usage) >=
- diskStructure->sectorSize) {
+ current_sector_usage) >= diskStructure->sectorSize) {
current_sector_usage = 0;
node->fileSectorsUsed++;
}
@@ -1862,7 +1857,7 @@
}
cd9660_bothendian_dword(node->fileSectorsUsed *
- diskStructure->sectorSize,node->isoDirRecord->size);
+ diskStructure->sectorSize,node->isoDirRecord->size);
/*
* This should point to the sector after the directory
@@ -1899,13 +1894,13 @@
child->fileSectorsUsed =
CD9660_BLOCKS(diskStructure->sectorSize,
- child->fileDataLength);
+ child->fileDataLength);
inode = child->node->inode;
if ((inode->flags & FI_ALLOCATED) == 0) {
inode->ino =
CD9660_BLOCKS(diskStructure->sectorSize,
- used_bytes + startOffset);
+ used_bytes + startOffset);
inode->flags |= FI_ALLOCATED;
used_bytes += child->fileSectorsUsed *
diskStructure->sectorSize;
diff --git a/usr.sbin/makefs/cd9660/cd9660_conversion.c b/usr.sbin/makefs/cd9660/cd9660_conversion.c
--- a/usr.sbin/makefs/cd9660/cd9660_conversion.c
+++ b/usr.sbin/makefs/cd9660/cd9660_conversion.c
@@ -174,13 +174,13 @@
(void)localtime_r(&tim, &t);
(void)snprintf(temp, sizeof(temp), "%04i%02i%02i%02i%02i%02i%02i",
- 1900+(int)t.tm_year,
- (int)t.tm_mon+1,
- (int)t.tm_mday,
- (int)t.tm_hour,
- (int)t.tm_min,
- (int)t.tm_sec,
- 0);
+ 1900+(int)t.tm_year,
+ (int)t.tm_mon+1,
+ (int)t.tm_mday,
+ (int)t.tm_hour,
+ (int)t.tm_min,
+ (int)t.tm_sec,
+ 0);
(void)memcpy(buf, temp, 16);
buf[16] = cd9660_compute_gm_offset(tim);
}
diff --git a/usr.sbin/makefs/cd9660/cd9660_debug.c b/usr.sbin/makefs/cd9660/cd9660_debug.c
--- a/usr.sbin/makefs/cd9660/cd9660_debug.c
+++ b/usr.sbin/makefs/cd9660/cd9660_debug.c
@@ -100,17 +100,17 @@
printf("(ROOT) (%" PRIu32 " to %" PRId64 ")\n",
node->fileDataSector,
node->fileDataSector +
- node->fileSectorsUsed - 1);
+ node->fileSectorsUsed - 1);
} else {
printf("%s (%s) (%" PRIu32 " to %" PRId64 ")\n",
node->isoDirRecord->name,
- (node->isoDirRecord->flags[0]
- & ISO_FLAG_DIRECTORY) ? "DIR" : "FILE",
+ (node->isoDirRecord->flags[0] & ISO_FLAG_DIRECTORY) ?
+ "DIR" : "FILE",
node->fileDataSector,
(node->fileSectorsUsed == 0) ?
- node->fileDataSector :
- node->fileDataSector
- + node->fileSectorsUsed - 1);
+ node->fileDataSector :
+ node->fileDataSector +
+ node->fileSectorsUsed - 1);
}
if (diskStructure->rock_ridge_enabled)
debug_print_susp_attrs(node, level + 1);
diff --git a/usr.sbin/makefs/cd9660/cd9660_strings.c b/usr.sbin/makefs/cd9660/cd9660_strings.c
--- a/usr.sbin/makefs/cd9660/cd9660_strings.c
+++ b/usr.sbin/makefs/cd9660/cd9660_strings.c
@@ -59,18 +59,16 @@
static inline int
cd9660_is_d_char(char c)
{
- return (isupper((unsigned char)c)
- || c == '_'
- || (c >= '0' && c <= '9'));
+ return (isupper((unsigned char)c) ||
+ c == '_' || (c >= '0' && c <= '9'));
}
static inline int
cd9660_is_a_char(char c)
{
- return (isupper((unsigned char)c)
- || c == '_'
- || (c >= '%' && c <= '?')
- || (c >= ' ' && c <= '\"'));
+ return (isupper((unsigned char)c) ||
+ c == '_' || (c >= '%' && c <= '?') ||
+ (c >= ' ' && c <= '\"'));
}
/*
diff --git a/usr.sbin/makefs/cd9660/cd9660_write.c b/usr.sbin/makefs/cd9660/cd9660_write.c
--- a/usr.sbin/makefs/cd9660/cd9660_write.c
+++ b/usr.sbin/makefs/cd9660/cd9660_write.c
@@ -195,13 +195,13 @@
cd9660_731(ptcur->fileDataSector,
temp_entry.first_sector);
cd9660_721((ptcur->parent == NULL ?
- 1 : ptcur->parent->ptnumber),
+ 1 : ptcur->parent->ptnumber),
temp_entry.parent_number);
} else {
cd9660_732(ptcur->fileDataSector,
temp_entry.first_sector);
cd9660_722((ptcur->parent == NULL ?
- 1 : ptcur->parent->ptnumber),
+ 1 : ptcur->parent->ptnumber),
temp_entry.parent_number);
}
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.c
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c
@@ -153,18 +153,16 @@
t->entry_type != SUSP_ENTRY_SUSP_CE)
continue;
cd9660_bothendian_dword(
- diskStructure->
- susp_continuation_area_start_sector,
- t->attr.su_entry.CE.ca_sector);
+ diskStructure->susp_continuation_area_start_sector,
+ t->attr.su_entry.CE.ca_sector);
cd9660_bothendian_dword(
- diskStructure->
- susp_continuation_area_start_sector,
- t->attr.su_entry.CE.ca_sector);
+ diskStructure->susp_continuation_area_start_sector,
+ t->attr.su_entry.CE.ca_sector);
cd9660_bothendian_dword(node->susp_entry_ce_start,
- t->attr.su_entry.CE.offset);
+ t->attr.su_entry.CE.offset);
cd9660_bothendian_dword(node->susp_entry_ce_length,
- t->attr.su_entry.CE.length);
+ t->attr.su_entry.CE.length);
}
return 0;
}
@@ -183,9 +181,8 @@
if (node->rr_relocated == NULL)
return -1;
cd9660_bothendian_dword(
- node->rr_relocated->fileDataSector,
- (unsigned char *)
- t->attr.rr_entry.CL.dir_loc);
+ node->rr_relocated->fileDataSector,
+ (unsigned char *)t->attr.rr_entry.CL.dir_loc);
break;
case SUSP_ENTRY_RRIP_PL:
/* Look at rr_real_parent */
@@ -193,9 +190,8 @@
node->parent->rr_real_parent == NULL)
return -1;
cd9660_bothendian_dword(
- node->parent->rr_real_parent->fileDataSector,
- (unsigned char *)
- t->attr.rr_entry.PL.dir_loc);
+ node->parent->rr_real_parent->fileDataSector,
+ (unsigned char *)t->attr.rr_entry.PL.dir_loc);
break;
}
}
@@ -243,7 +239,7 @@
/* A CE entry is needed */
if (working <= 0) {
CE = cd9660node_susp_create_node(SUSP_TYPE_SUSP,
- SUSP_ENTRY_SUSP_CE, "CE", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_SUSP_CE, "CE", SUSP_LOC_ENTRY);
cd9660_susp_ce(CE, node);
/* This will automatically insert at the appropriate location */
if (pre_ce != NULL)
@@ -314,7 +310,7 @@
if (node->type & CD9660_TYPE_DOT) {
if (node->parent == diskStructure->rootNode) {
temp = cd9660node_susp_create_node(SUSP_TYPE_SUSP,
- SUSP_ENTRY_SUSP_SP, "SP", SUSP_LOC_DOT);
+ SUSP_ENTRY_SUSP_SP, "SP", SUSP_LOC_DOT);
cd9660_susp_sp(temp, node);
/* Should be first entry. */
@@ -338,14 +334,14 @@
if ((node->node != NULL) && (node->node->inode != NULL)) {
/* PX - POSIX attributes */
attr = cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY);
cd9660node_rrip_px(attr, node->node);
TAILQ_INSERT_TAIL(&node->head, attr, rr_ll);
/* TF - timestamp */
attr = cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_TF, "TF", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_RRIP_TF, "TF", SUSP_LOC_ENTRY);
cd9660node_rrip_tf(attr, node->node);
TAILQ_INSERT_TAIL(&node->head, attr, rr_ll);
@@ -360,10 +356,8 @@
if (node->node->inode != NULL &&
((S_ISCHR(node->node->inode->st.st_mode) ||
S_ISBLK(node->node->inode->st.st_mode)))) {
- attr =
- cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_PN, "PN",
- SUSP_LOC_ENTRY);
+ attr = cd9660node_susp_create_node(SUSP_TYPE_RRIP,
+ SUSP_ENTRY_RRIP_PN, "PN", SUSP_LOC_ENTRY);
cd9660node_rrip_pn(attr, node->node);
TAILQ_INSERT_TAIL(&node->head, attr, rr_ll);
}
@@ -385,13 +379,13 @@
*/
if (node->parent == diskStructure->rootNode) {
cd9660_susp_ER(node, 1, SUSP_RRIP_ER_EXT_ID,
- SUSP_RRIP_ER_EXT_DES, SUSP_RRIP_ER_EXT_SRC);
+ SUSP_RRIP_ER_EXT_DES, SUSP_RRIP_ER_EXT_SRC);
}
if (parent != NULL && parent->node != NULL &&
parent->node->inode != NULL) {
/* PX - POSIX attributes */
current = cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY);
cd9660node_rrip_px(current, parent->node);
TAILQ_INSERT_TAIL(&node->head, current, rr_ll);
}
@@ -400,7 +394,7 @@
grandparent->node->inode != NULL) {
/* PX - POSIX attributes */
current = cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY);
cd9660node_rrip_px(current, grandparent->node);
TAILQ_INSERT_TAIL(&node->head, current, rr_ll);
}
@@ -425,7 +419,7 @@
/* First handle the CL for the placeholder file. */
if (node->rr_relocated != NULL) {
current = cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_CL, "CL", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_RRIP_CL, "CL", SUSP_LOC_ENTRY);
cd9660_rrip_CL(current, node);
TAILQ_INSERT_TAIL(&node->head, current, rr_ll);
}
@@ -433,7 +427,7 @@
/* Handle RE*/
if (node->rr_real_parent != NULL) {
current = cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_RE, "RE", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_RRIP_RE, "RE", SUSP_LOC_ENTRY);
cd9660_rrip_RE(current,node);
TAILQ_INSERT_TAIL(&node->head, current, rr_ll);
}
@@ -443,7 +437,7 @@
struct ISO_SUSP_ATTRIBUTES*
cd9660node_susp_create_node(int susp_type, int entry_type, const char *type_id,
- int write_loc)
+ int write_loc)
{
struct ISO_SUSP_ATTRIBUTES* temp;
@@ -571,7 +565,7 @@
current->attr.rr_entry.SL.h.length[0] = path_count + 5;
TAILQ_INSERT_TAIL(&node->head, current, rr_ll);
current= cd9660node_susp_create_node(SUSP_TYPE_RRIP,
- SUSP_ENTRY_RRIP_SL, "SL", SUSP_LOC_ENTRY);
+ SUSP_ENTRY_RRIP_SL, "SL", SUSP_LOC_ENTRY);
current->attr.rr_entry.SL.h.version[0] = 1;
current->attr.rr_entry.SL.flags[0] = SL_FLAGS_NONE;
@@ -584,8 +578,8 @@
j++;
path_count++;
}
- current->attr.rr_entry.SL.component[1]
- = path_count;
+ current->attr.rr_entry.SL.component[1] =
+ path_count;
path_count+= 2;
} else {
while(j != dir_count) {
@@ -599,8 +593,7 @@
if (dir_copied == 1) {
temp_cr[1] = dir_count;
memcpy(current->attr.rr_entry.SL.component +
- path_count,
- temp_cr, dir_count + 2);
+ path_count, temp_cr, dir_count + 2);
path_count += dir_count + 2;
}
}
@@ -685,15 +678,15 @@
*/
cd9660_time_915(p->attr.rr_entry.TF.timestamp,
- _node->inode->st.st_mtime);
+ _node->inode->st.st_mtime);
p->attr.rr_entry.TF.h.length[0] += 7;
cd9660_time_915(p->attr.rr_entry.TF.timestamp + 7,
- _node->inode->st.st_atime);
+ _node->inode->st.st_atime);
p->attr.rr_entry.TF.h.length[0] += 7;
cd9660_time_915(p->attr.rr_entry.TF.timestamp + 14,
- _node->inode->st.st_ctime);
+ _node->inode->st.st_ctime);
p->attr.rr_entry.TF.h.length[0] += 7;
return 1;
}
@@ -777,15 +770,14 @@
}
struct ISO_SUSP_ATTRIBUTES*
-cd9660_susp_ER(cd9660node *node,
- u_char ext_version, const char* ext_id, const char* ext_des,
- const char* ext_src)
+cd9660_susp_ER(cd9660node *node, u_char ext_version, const char* ext_id,
+ const char* ext_des, const char* ext_src)
{
int l;
struct ISO_SUSP_ATTRIBUTES *r;
r = cd9660node_susp_create_node(SUSP_TYPE_SUSP,
- SUSP_ENTRY_SUSP_ER, "ER", SUSP_LOC_DOT);
+ SUSP_ENTRY_SUSP_ER, "ER", SUSP_LOC_DOT);
/* Fixed data is 8 bytes */
r->attr.su_entry.ER.h.length[0] = 8;
@@ -796,8 +788,8 @@
r->attr.su_entry.ER.len_src[0] = (u_char)strlen(ext_src);
l = r->attr.su_entry.ER.len_id[0] +
- r->attr.su_entry.ER.len_src[0] +
- r->attr.su_entry.ER.len_des[0];
+ r->attr.su_entry.ER.len_src[0] +
+ r->attr.su_entry.ER.len_des[0];
/* Everything must fit. */
assert(l + r->attr.su_entry.ER.h.length[0] <= 254);
@@ -807,14 +799,14 @@
r->attr.su_entry.ER.ext_ver[0] = ext_version;
memcpy(r->attr.su_entry.ER.ext_data, ext_id,
- (int)r->attr.su_entry.ER.len_id[0]);
+ (int)r->attr.su_entry.ER.len_id[0]);
l = (int) r->attr.su_entry.ER.len_id[0];
memcpy(r->attr.su_entry.ER.ext_data + l,ext_des,
- (int)r->attr.su_entry.ER.len_des[0]);
+ (int)r->attr.su_entry.ER.len_des[0]);
l += (int)r->attr.su_entry.ER.len_des[0];
memcpy(r->attr.su_entry.ER.ext_data + l,ext_src,
- (int)r->attr.su_entry.ER.len_src[0]);
+ (int)r->attr.su_entry.ER.len_src[0]);
TAILQ_INSERT_TAIL(&node->head, r, rr_ll);
return r;
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -144,9 +144,9 @@
static void ffs_write_file(union dinode *, uint32_t, void *, fsinfo_t *);
static void ffs_write_inode(union dinode *, uint32_t, const fsinfo_t *);
static void *ffs_build_dinode1(struct ufs1_dinode *, dirbuf_t *, fsnode *,
- fsnode *, fsinfo_t *);
+ fsnode *, fsinfo_t *);
static void *ffs_build_dinode2(struct ufs2_dinode *, dirbuf_t *, fsnode *,
- fsnode *, fsinfo_t *);
+ fsnode *, fsinfo_t *);
/* publicly visible functions */
@@ -659,8 +659,8 @@
slen = strlen(node->symlink) + 1;
if (slen >= (ffs_opts->version == 1 ?
- UFS1_MAXSYMLINKLEN :
- UFS2_MAXSYMLINKLEN))
+ UFS1_MAXSYMLINKLEN :
+ UFS2_MAXSYMLINKLEN))
ADDSIZE(slen);
}
}
@@ -980,7 +980,8 @@
offset = DIP(din, size) - bufleft;
if (debug & DEBUG_FS_WRITE_FILE_BLOCK)
printf(
- "ffs_write_file: write %p offset %lld size %lld left %lld\n",
+ "ffs_write_file: write %p offset %lld size %lld "
+ "left %lld\n",
p, (long long)offset,
(long long)chunk, (long long)bufleft);
/*
@@ -990,7 +991,7 @@
* sized chunk. however, ffs_balloc() handles this for us
*/
errno = ffs_balloc(&in, offset, chunk, &bp);
- bad_ffs_write_file:
+bad_ffs_write_file:
if (errno != 0)
err(1,
"Writing inode %d (%s), bytes %lld + %lld",
@@ -1007,7 +1008,7 @@
p += chunk;
}
- write_inode_and_leave:
+write_inode_and_leave:
ffs_write_inode(&in.i_din, in.i_number, fsopts);
if (fbuf)
free(fbuf);
@@ -1032,7 +1033,7 @@
de = (struct direct *)(dbuf->buf + i);
reclen = ufs_rw16(de->d_reclen, needswap);
printf(
- " inode %4d %7s offset %4d reclen %3d namlen %3d name %s\n",
+ " inode %4d %7s offset %4d reclen %3d namlen %3d name %s\n",
ufs_rw32(de->d_ino, needswap),
inode_type(DTTOIF(de->d_type)), i, reclen,
de->d_namlen, de->d_name);
diff --git a/usr.sbin/makefs/ffs/buf.h b/usr.sbin/makefs/ffs/buf.h
--- a/usr.sbin/makefs/ffs/buf.h
+++ b/usr.sbin/makefs/ffs/buf.h
@@ -67,7 +67,7 @@
void bcleanup(void);
int bread(struct m_vnode *, daddr_t, int, struct ucred *,
- struct m_buf **);
+ struct m_buf **);
void brelse(struct m_buf *);
int bwrite(struct m_buf *);
struct m_buf * getblk(struct m_vnode *, daddr_t, int, int, int, int);
diff --git a/usr.sbin/makefs/ffs/ffs_alloc.c b/usr.sbin/makefs/ffs/ffs_alloc.c
--- a/usr.sbin/makefs/ffs/ffs_alloc.c
+++ b/usr.sbin/makefs/ffs/ffs_alloc.c
@@ -67,7 +67,7 @@
static daddr_t ffs_alloccg(struct inode *, int, daddr_t, int);
static daddr_t ffs_alloccgblk(struct inode *, struct m_buf *, daddr_t);
static daddr_t ffs_hashalloc(struct inode *, u_int, daddr_t, int,
- daddr_t (*)(struct inode *, int, daddr_t, int));
+ daddr_t (*)(struct inode *, int, daddr_t, int));
static int32_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int);
/*
@@ -211,7 +211,7 @@
ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg;
else
startcg = dtog(fs,
- ufs_rw64(bap[indx - 1], UFS_FSNEEDSWAP(fs)) + 1);
+ ufs_rw64(bap[indx - 1], UFS_FSNEEDSWAP(fs)) + 1);
startcg %= fs->fs_ncg;
avgbfree = fs->fs_cstotal.cs_nbfree / fs->fs_ncg;
for (cg = startcg; cg < fs->fs_ncg; cg++)
@@ -387,7 +387,8 @@
cgp = (struct cg *)bp->b_data;
blksfree_swap = cg_blksfree_swap(cgp, needswap);
- if (bpref == 0 || (uint32_t)dtog(fs, bpref) != ufs_rw32(cgp->cg_cgx, needswap)) {
+ if (bpref == 0 || (uint32_t)dtog(fs, bpref) !=
+ ufs_rw32(cgp->cg_cgx, needswap)) {
bpref = ufs_rw32(cgp->cg_rotor, needswap);
} else {
bpref = blknum(fs, bpref);
@@ -556,15 +557,15 @@
len = start + 1;
start = 0;
loc = scanc((u_int)len,
- (const u_char *)&cg_blksfree_swap(cgp, needswap)[0],
- (const u_char *)fragtbl[fs->fs_frag],
- (1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
+ (const u_char *)&cg_blksfree_swap(cgp, needswap)[0],
+ (const u_char *)fragtbl[fs->fs_frag],
+ (1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
if (loc == 0) {
- errx(1,
- "ffs_alloccg: map corrupted: start %d len %d offset %d %ld",
- ostart, olen,
- ufs_rw32(cgp->cg_freeoff, needswap),
- (long)cg_blksfree_swap(cgp, needswap) - (long)cgp);
+ errx(1, "ffs_alloccg: map corrupted: start %d "
+ "len %d offset %d %ld",
+ ostart, olen,
+ ufs_rw32(cgp->cg_freeoff, needswap),
+ (long)cg_blksfree_swap(cgp, needswap) - (long)cgp);
/* NOTREACHED */
}
}
diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c
--- a/usr.sbin/makefs/ffs/mkfs.c
+++ b/usr.sbin/makefs/ffs/mkfs.c
@@ -249,7 +249,7 @@
sblock.fs_fragshift++;
if (sblock.fs_frag > MAXFRAG) {
printf("fragment size %d is too small, "
- "minimum with block size %d is %d\n",
+ "minimum with block size %d is %d\n",
sblock.fs_fsize, sblock.fs_bsize,
sblock.fs_bsize / MAXFRAG);
exit(21);
@@ -291,7 +291,7 @@
sblock.fs_sblkno =
roundup(howmany(sblock.fs_sblockloc + SBLOCKSIZE, sblock.fs_fsize),
- sblock.fs_frag);
+ sblock.fs_frag);
sblock.fs_cblkno = (daddr_t)(sblock.fs_sblkno +
roundup(howmany(SBLOCKSIZE, sblock.fs_fsize), sblock.fs_frag));
sblock.fs_iblkno = sblock.fs_cblkno + sblock.fs_frag;
@@ -487,12 +487,12 @@
*/
#define B2MBFACTOR (1 / (1024.0 * 1024.0))
printf("%s: %.1fMB (%lld sectors) block size %d, "
- "fragment size %d\n",
+ "fragment size %d\n",
fsys, (float)sblock.fs_size * sblock.fs_fsize * B2MBFACTOR,
(long long)fsbtodb(&sblock, sblock.fs_size),
sblock.fs_bsize, sblock.fs_fsize);
printf("\tusing %d cylinder groups of %.2fMB, %d blks, "
- "%d inodes.\n",
+ "%d inodes.\n",
sblock.fs_ncg,
(float)sblock.fs_fpg * sblock.fs_fsize * B2MBFACTOR,
sblock.fs_fpg / sblock.fs_frag, sblock.fs_ipg);
@@ -503,7 +503,7 @@
* subwindows in sysinst.
*/
printcolwidth = count_digits(
- fsbtodb(&sblock, cgsblock(&sblock, sblock.fs_ncg -1)));
+ fsbtodb(&sblock, cgsblock(&sblock, sblock.fs_ncg -1)));
nprintcols = 76 / (printcolwidth + 2);
/*
@@ -530,7 +530,7 @@
if (cylno % nprintcols == 0)
printf("\n");
printf(" %*lld,", printcolwidth,
- (long long)fsbtodb(&sblock, cgsblock(&sblock, cylno)));
+ (long long)fsbtodb(&sblock, cgsblock(&sblock, cylno)));
fflush(stdout);
}
printf("\n");
diff --git a/usr.sbin/makefs/makefs.h b/usr.sbin/makefs/makefs.h
--- a/usr.sbin/makefs/makefs.h
+++ b/usr.sbin/makefs/makefs.h
@@ -174,7 +174,7 @@
fsnode * read_mtree(const char *, fsnode *);
int set_option(const option_t *, const char *, char *, size_t);
int set_option_var(const option_t *, const char *, const char *,
- char *, size_t);
+ char *, size_t);
fsnode * walk_dir(const char *, const char *, fsnode *, fsnode *);
void free_fsnodes(fsnode *);
option_t * copy_opts(const option_t *);
diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c
--- a/usr.sbin/makefs/makefs.c
+++ b/usr.sbin/makefs/makefs.c
@@ -158,11 +158,11 @@
optarg[len] = '\0';
fsoptions.freeblockpc =
strsuftoll("free block percentage",
- optarg, 0, 99);
+ optarg, 0, 99);
} else {
fsoptions.freeblocks =
strsuftoll("free blocks",
- optarg, 0, LLONG_MAX);
+ optarg, 0, LLONG_MAX);
}
break;
@@ -180,11 +180,11 @@
optarg[len] = '\0';
fsoptions.freefilepc =
strsuftoll("free file percentage",
- optarg, 0, 99);
+ optarg, 0, 99);
} else {
fsoptions.freefiles =
strsuftoll("free files",
- optarg, 0, LLONG_MAX);
+ optarg, 0, LLONG_MAX);
}
break;
@@ -200,8 +200,8 @@
case 'N':
if (! setup_getid(optarg))
errx(1,
- "Unable to use user and group databases in `%s'",
- optarg);
+ "Unable to use user and group databases "
+ "in `%s'", optarg);
break;
case 'm':
@@ -244,8 +244,7 @@
case 'S':
fsoptions.sectorsize =
- (int)strsuftoll("sector size", optarg,
- 1LL, INT_MAX);
+ (int)strsuftoll("sector size", optarg, 1LL, INT_MAX);
break;
case 't':
@@ -261,7 +260,7 @@
case 'T':
if (get_tstamp(optarg, &stampst) == -1)
errx(1, "Cannot get timestamp from `%s'",
- optarg);
+ optarg);
break;
case 'x':
@@ -487,11 +486,11 @@
prog = getprogname();
fprintf(stderr,
-"Usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n"
-"\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n"
-"\t[-N userdb-dir] [-O offset] [-o fs-options] [-R roundup-size]\n"
-"\t[-S sector-size] [-s image-size] [-T <timestamp/file>] [-t fs-type]\n"
-"\timage-file directory | manifest [extra-directory ...]\n",
+ "Usage: %s [-xZ] [-B endian] [-b free-blocks] [-d debug-mask]\n"
+ "\t[-F mtree-specfile] [-f free-files] [-M minimum-size] [-m maximum-size]\n"
+ "\t[-N userdb-dir] [-O offset] [-o fs-options] [-R roundup-size]\n"
+ "\t[-S sector-size] [-s image-size] [-T <timestamp/file>] [-t fs-type]\n"
+ "\timage-file directory | manifest [extra-directory ...]\n",
prog);
if (fstype) {
diff --git a/usr.sbin/makefs/msdos/msdosfs_conv.c b/usr.sbin/makefs/msdos/msdosfs_conv.c
--- a/usr.sbin/makefs/msdos/msdosfs_conv.c
+++ b/usr.sbin/makefs/msdos/msdosfs_conv.c
@@ -366,8 +366,8 @@
else
l = unlen - (dp - un);
for (i = 0, j = 8; i < l && j < 11; i++, j++) {
- if (dp[i] != (dn[j] = unix2dos[dp[i]])
- && conv != 3)
+ if (dp[i] != (dn[j] = unix2dos[dp[i]]) &&
+ conv != 3)
conv = 2;
if (!dn[j]) {
conv = 3;
@@ -392,8 +392,8 @@
dn[j] = ' ';
else
dn[j] = unix2dos[*un];
- if ((*un != dn[j])
- && conv != 3)
+ if ((*un != dn[j]) &&
+ conv != 3)
conv = 2;
if (!dn[j]) {
conv = 3;
diff --git a/usr.sbin/makefs/msdos/msdosfs_denode.c b/usr.sbin/makefs/msdos/msdosfs_denode.c
--- a/usr.sbin/makefs/msdos/msdosfs_denode.c
+++ b/usr.sbin/makefs/msdos/msdosfs_denode.c
@@ -116,9 +116,9 @@
/*
* Copy the directory entry into the denode area of the vnode.
*/
- if ((dirclust == MSDOSFSROOT
- || (FAT32(pmp) && dirclust == pmp->pm_rootdirblk))
- && diroffset == MSDOSFSROOT_OFS) {
+ if ((dirclust == MSDOSFSROOT ||
+ (FAT32(pmp) && dirclust == pmp->pm_rootdirblk)) &&
+ diroffset == MSDOSFSROOT_OFS) {
/*
* Directory entry for the root directory. There isn't one,
* so we manufacture one. We should probably rummage
@@ -144,8 +144,8 @@
*/
ldep->de_CHun = 0;
ldep->de_CTime = 0x0000; /* 00:00:00 */
- ldep->de_CDate = (0 << DD_YEAR_SHIFT) | (1 << DD_MONTH_SHIFT)
- | (1 << DD_DAY_SHIFT);
+ ldep->de_CDate = (0 << DD_YEAR_SHIFT) | (1 << DD_MONTH_SHIFT) |
+ (1 << DD_DAY_SHIFT);
/* Jan 1, 1980 */
ldep->de_ADate = ldep->de_CDate;
ldep->de_MTime = ldep->de_CTime;
diff --git a/usr.sbin/makefs/msdos/msdosfs_fat.c b/usr.sbin/makefs/msdos/msdosfs_fat.c
--- a/usr.sbin/makefs/msdos/msdosfs_fat.c
+++ b/usr.sbin/makefs/msdos/msdosfs_fat.c
@@ -83,10 +83,8 @@
u_long *fsrcnp);
static void updatefats(struct msdosfsmount *pmp, struct m_buf *bp,
u_long fatbn);
-static __inline void
- usemap_alloc(struct msdosfsmount *pmp, u_long cn);
-static __inline void
- usemap_free(struct msdosfsmount *pmp, u_long cn);
+static __inline void usemap_alloc(struct msdosfsmount *pmp, u_long cn);
+static __inline void usemap_free(struct msdosfsmount *pmp, u_long cn);
static int clusteralloc1(struct msdosfsmount *pmp, u_long start,
u_long count, u_long fillwith, u_long *retcluster,
u_long *got);
@@ -744,7 +742,8 @@
if (start) {
if ((len = chainlength(pmp, start, count)) >= count)
- return (chainalloc(pmp, start, count, fillwith, retcluster, got));
+ return (chainalloc(pmp, start, count, fillwith,
+ retcluster, got));
} else
len = 0;
@@ -758,7 +757,8 @@
if (map != FULL_RUN) {
cn = idx * N_INUSEBITS + ffs(map ^ FULL_RUN) - 1;
if ((l = chainlength(pmp, cn, count)) >= count)
- return (chainalloc(pmp, cn, count, fillwith, retcluster, got));
+ return (chainalloc(pmp, cn, count, fillwith,
+ retcluster, got));
if (l > foundl) {
foundcn = cn;
foundl = l;
@@ -775,7 +775,8 @@
if (map != FULL_RUN) {
cn = idx * N_INUSEBITS + ffs(map ^ FULL_RUN) - 1;
if ((l = chainlength(pmp, cn, count)) >= count)
- return (chainalloc(pmp, cn, count, fillwith, retcluster, got));
+ return (chainalloc(pmp, cn, count, fillwith,
+ retcluster, got));
if (l > foundl) {
foundcn = cn;
foundl = l;
@@ -792,7 +793,8 @@
if (len)
return (chainalloc(pmp, start, len, fillwith, retcluster, got));
else
- return (chainalloc(pmp, foundcn, foundl, fillwith, retcluster, got));
+ return (chainalloc(pmp, foundcn, foundl, fillwith,
+ retcluster, got));
}
@@ -848,7 +850,7 @@
case FAT32_MASK:
cluster = getulong(bp->b_data + bo);
putulong(bp->b_data + bo,
- (MSDOSFSFREE & FAT32_MASK) | (cluster & ~FAT32_MASK));
+ (MSDOSFSFREE & FAT32_MASK) | (cluster & ~FAT32_MASK));
break;
}
cluster &= pmp->pm_fatmask;
@@ -960,8 +962,8 @@
/*
* Don't try to extend the root directory
*/
- if (dep->de_StartCluster == MSDOSFSROOT
- && (dep->de_Attributes & ATTR_DIRECTORY)) {
+ if (dep->de_StartCluster == MSDOSFSROOT &&
+ (dep->de_Attributes & ATTR_DIRECTORY)) {
#ifdef MSDOSFS_DEBUG
printf("extendfile(): attempt to extend root directory\n");
#endif
diff --git a/usr.sbin/makefs/msdos/msdosfs_lookup.c b/usr.sbin/makefs/msdos/msdosfs_lookup.c
--- a/usr.sbin/makefs/msdos/msdosfs_lookup.c
+++ b/usr.sbin/makefs/msdos/msdosfs_lookup.c
@@ -96,8 +96,8 @@
* case.
*/
if (ddep->de_fndoffset >= ddep->de_FileSize) {
- diroffset = ddep->de_fndoffset + sizeof(struct direntry)
- - ddep->de_FileSize;
+ diroffset = ddep->de_fndoffset + sizeof(struct direntry) -
+ ddep->de_FileSize;
dirclust = de_clcount(pmp, diroffset);
error = m_extendfile(ddep, dirclust, 0, 0, DE_CLEAR);
if (error) {
@@ -117,7 +117,7 @@
* do not get smaller as clusters are emptied.
*/
error = pcbmap(ddep, de_cluster(pmp, ddep->de_fndoffset),
- &bn, &dirclust, &blsize);
+ &bn, &dirclust, &blsize);
if (error)
return error;
diroffset = ddep->de_fndoffset;
@@ -146,15 +146,13 @@
return error;
ddep->de_fndoffset -= sizeof(struct direntry);
- error = pcbmap(ddep,
- de_cluster(pmp,
- ddep->de_fndoffset),
- &bn, 0, &blsize);
+ error = pcbmap(ddep, de_cluster(pmp,
+ ddep->de_fndoffset), &bn, 0, &blsize);
if (error)
return error;
error = bread((void *)pmp->pm_devvp, bn, blsize,
- NOCRED, &bp);
+ NOCRED, &bp);
if (error) {
return error;
}
@@ -164,7 +162,7 @@
ddep->de_fndoffset -= sizeof(struct direntry);
}
if (!unix2winfn(un, unlen, (struct winentry *)ndep,
- cnt++, chksum))
+ cnt++, chksum))
break;
}
}
@@ -205,8 +203,8 @@
int blsize;
blsize = pmp->pm_bpcluster;
- if (dirclust == MSDOSFSROOT
- && de_blk(pmp, diroffset + blsize) > pmp->pm_rootdirsize)
+ if (dirclust == MSDOSFSROOT &&
+ de_blk(pmp, diroffset + blsize) > pmp->pm_rootdirsize)
blsize = de_bn2off(pmp, pmp->pm_rootdirsize) & pmp->pm_crbomask;
bn = detobn(pmp, dirclust, diroffset);
if ((error = bread((void *)pmp->pm_devvp, bn, blsize, NOCRED,
diff --git a/usr.sbin/makefs/msdos/msdosfs_vfsops.c b/usr.sbin/makefs/msdos/msdosfs_vfsops.c
--- a/usr.sbin/makefs/msdos/msdosfs_vfsops.c
+++ b/usr.sbin/makefs/msdos/msdosfs_vfsops.c
@@ -183,15 +183,15 @@
pmp->pm_fatblk = pmp->pm_ResSectors;
if (FAT32(pmp)) {
pmp->pm_rootdirblk = getulong(b710->bpbRootClust);
- pmp->pm_firstcluster = pmp->pm_fatblk
- + (pmp->pm_FATs * pmp->pm_FATsecs);
+ pmp->pm_firstcluster = pmp->pm_fatblk +
+ (pmp->pm_FATs * pmp->pm_FATsecs);
pmp->pm_fsinfo = getushort(b710->bpbFSInfo);
} else {
pmp->pm_rootdirblk = pmp->pm_fatblk +
- (pmp->pm_FATs * pmp->pm_FATsecs);
- pmp->pm_rootdirsize = (pmp->pm_RootDirEnts * sizeof(struct direntry)
- + pmp->pm_BytesPerSec - 1)
- / pmp->pm_BytesPerSec;/* in sectors */
+ (pmp->pm_FATs * pmp->pm_FATsecs);
+ pmp->pm_rootdirsize = (pmp->pm_RootDirEnts *
+ sizeof(struct direntry) + pmp->pm_BytesPerSec - 1) /
+ pmp->pm_BytesPerSec;/* in sectors */
pmp->pm_firstcluster = pmp->pm_rootdirblk + pmp->pm_rootdirsize;
}
@@ -200,8 +200,8 @@
pmp->pm_fatsize = pmp->pm_FATsecs * pmp->pm_BytesPerSec;
if (pmp->pm_fatmask == 0) {
- if (pmp->pm_maxcluster
- <= ((CLUST_RSRVD - CLUST_FIRST) & FAT12_MASK)) {
+ if (pmp->pm_maxcluster <=
+ ((CLUST_RSRVD - CLUST_FIRST) & FAT12_MASK)) {
/*
* This will usually be a floppy disk. This size makes
* sure that one FAT entry will not be split across
@@ -271,9 +271,9 @@
pmp->pm_BytesPerSec, 0, &bp)) != 0)
goto error_exit;
fp = (struct fsinfo *)bp->b_data;
- if (!memcmp(fp->fsisig1, "RRaA", 4)
- && !memcmp(fp->fsisig2, "rrAa", 4)
- && !memcmp(fp->fsisig3, "\0\0\125\252", 4))
+ if (!memcmp(fp->fsisig1, "RRaA", 4) &&
+ !memcmp(fp->fsisig2, "rrAa", 4) &&
+ !memcmp(fp->fsisig3, "\0\0\125\252", 4))
pmp->pm_nxtfree = getulong(fp->fsinxtfree);
else
pmp->pm_fsinfo = 0;
diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c
--- a/usr.sbin/makefs/msdos/msdosfs_vnops.c
+++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c
@@ -281,8 +281,9 @@
* Check for a checksum or name match
*/
chksum_ok = (chksum == winChksum(dep->deName));
- if (!chksum_ok
- && (!olddos || memcmp(dosfilename, dep->deName, 11))) {
+ if (!chksum_ok &&
+ (!olddos || memcmp(dosfilename,
+ dep->deName, 11))) {
chksum = -1;
continue;
}
@@ -376,8 +377,8 @@
* can't do anything. This is because the root directory can not
* change size.
*/
- if (pdep->de_StartCluster == MSDOSFSROOT
- && pdep->de_fndoffset >= pdep->de_FileSize) {
+ if (pdep->de_StartCluster == MSDOSFSROOT &&
+ pdep->de_fndoffset >= pdep->de_FileSize) {
error = ENOSPC;
goto bad;
}
@@ -393,7 +394,7 @@
goto bad;
ndirent.de_Attributes = (st->st_mode & S_IWUSR) ?
- ATTR_ARCHIVE : ATTR_ARCHIVE | ATTR_READONLY;
+ ATTR_ARCHIVE : ATTR_ARCHIVE | ATTR_READONLY;
ndirent.de_StartCluster = 0;
ndirent.de_FileSize = 0;
ndirent.de_pmp = pdep->de_pmp;
@@ -469,8 +470,8 @@
return error;
}
- if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0))
- == MAP_FAILED) {
+ if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0)) ==
+ MAP_FAILED) {
error = errno;
fprintf(stderr, "%s: mmap %s: %s\n", __func__, node->name,
strerror(error));
@@ -556,8 +557,8 @@
* can't do anything. This is because the root directory can not
* change size.
*/
- if (pdep->de_StartCluster == MSDOSFSROOT
- && pdep->de_fndoffset >= pdep->de_FileSize) {
+ if (pdep->de_StartCluster == MSDOSFSROOT &&
+ pdep->de_fndoffset >= pdep->de_FileSize) {
error = ENOSPC;
goto bad2;
}
diff --git a/usr.sbin/makefs/walk.c b/usr.sbin/makefs/walk.c
--- a/usr.sbin/makefs/walk.c
+++ b/usr.sbin/makefs/walk.c
@@ -61,7 +61,7 @@
static void apply_specdir(const char *, NODE *, fsnode *, int);
static void apply_specentry(const char *, NODE *, fsnode *);
static fsnode *create_fsnode(const char *, const char *, const char *,
- struct stat *);
+ struct stat *);
/*
@@ -367,7 +367,8 @@
if (speconly) {
fsnode *next;
assert(dirnode->name[0] == '.' && dirnode->name[1] == '\0');
- for (curfsnode = dirnode->next; curfsnode != NULL; curfsnode = next) {
+ for (curfsnode = dirnode->next; curfsnode != NULL;
+ curfsnode = next) {
next = curfsnode->next;
for (curnode = specnode->child; curnode != NULL;
curnode = curnode->next) {
@@ -376,7 +377,9 @@
}
if (curnode == NULL) {
if (debug & DEBUG_APPLY_SPECONLY) {
- printf("apply_specdir: trimming %s/%s %p\n", dir, curfsnode->name, curfsnode);
+ printf("apply_specdir: "
+ "trimming %s/%s %p\n",
+ dir, curfsnode->name, curfsnode);
}
free_fsnodes(curfsnode);
}
@@ -411,7 +414,7 @@
*/
if ((curnode->flags & F_OPT) &&
lstat(path, &stbuf) == -1)
- continue;
+ continue;
/* check that enough info is provided */
#define NODETEST(t, m) \
@@ -520,13 +523,13 @@
ASEPRINT("time", "%ld",
(long)dirnode->inode->st.st_mtime,
(long)specnode->st_mtimespec.tv_sec);
- dirnode->inode->st.st_mtime = specnode->st_mtimespec.tv_sec;
- dirnode->inode->st.st_atime = specnode->st_mtimespec.tv_sec;
- dirnode->inode->st.st_ctime = start_time.tv_sec;
+ dirnode->inode->st.st_mtime = specnode->st_mtimespec.tv_sec;
+ dirnode->inode->st.st_atime = specnode->st_mtimespec.tv_sec;
+ dirnode->inode->st.st_ctime = start_time.tv_sec;
#if HAVE_STRUCT_STAT_ST_MTIMENSEC
- dirnode->inode->st.st_mtimensec = specnode->st_mtimespec.tv_nsec;
- dirnode->inode->st.st_atimensec = specnode->st_mtimespec.tv_nsec;
- dirnode->inode->st.st_ctimensec = start_time.tv_nsec;
+ dirnode->inode->st.st_mtimensec = specnode->st_mtimespec.tv_nsec;
+ dirnode->inode->st.st_atimensec = specnode->st_mtimespec.tv_nsec;
+ dirnode->inode->st.st_ctimensec = start_time.tv_nsec;
#endif
}
if (specnode->flags & (F_UID | F_UNAME)) {

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 10, 4:04 PM (7 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16579831
Default Alt Text
D39443.diff (41 KB)

Event Timeline