lots of silly indent fixes
This commit is contained in:
parent
cf94446af7
commit
9275814a9e
@ -553,7 +553,7 @@ static void parse_conf(const char *path, int flag)
|
|||||||
} else if ((cf[1] == '.') && (cf[2] == '/' || cf[2] == 0)) {
|
} else if ((cf[1] == '.') && (cf[2] == '/' || cf[2] == 0)) {
|
||||||
++cf;
|
++cf;
|
||||||
if (p > p0) {
|
if (p > p0) {
|
||||||
while (*--p != '/'); /* omit previous dir */
|
while (*--p != '/') /* omit previous dir */;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1571,7 +1571,7 @@ BAD_REQUEST:
|
|||||||
/* protect out root */
|
/* protect out root */
|
||||||
goto BAD_REQUEST;
|
goto BAD_REQUEST;
|
||||||
}
|
}
|
||||||
while (*--purl != '/'); /* omit previous dir */
|
while (*--purl != '/') /* omit previous dir */;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ void ip_parse_common_args(int *argcp, char ***argvp)
|
|||||||
if (matches(opt, "-family") == 0) {
|
if (matches(opt, "-family") == 0) {
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
if (! argv[1])
|
if (!argv[1])
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
if (strcmp(argv[1], "inet") == 0)
|
if (strcmp(argv[1], "inet") == 0)
|
||||||
preferred_family = AF_INET;
|
preferred_family = AF_INET;
|
||||||
|
@ -1000,7 +1000,7 @@ traceroute_main(int argc, char *argv[])
|
|||||||
* set the ip source address of the outbound
|
* set the ip source address of the outbound
|
||||||
* probe (e.g., on a multi-homed host).
|
* probe (e.g., on a multi-homed host).
|
||||||
*/
|
*/
|
||||||
if (getuid()) bb_error_msg_and_die("-s %s: Permission denied", source);
|
if (getuid()) bb_error_msg_and_die("-s %s: permission denied", source);
|
||||||
}
|
}
|
||||||
if(waittime_str)
|
if(waittime_str)
|
||||||
waittime = str2val(waittime_str, "wait time", 2, 24 * 60 * 60);
|
waittime = str2val(waittime_str, "wait time", 2, 24 * 60 * 60);
|
||||||
@ -1015,7 +1015,7 @@ traceroute_main(int argc, char *argv[])
|
|||||||
|
|
||||||
for(l_sr = sourse_route_list; l_sr; ) {
|
for(l_sr = sourse_route_list; l_sr; ) {
|
||||||
if (lsrr >= NGATEWAYS)
|
if (lsrr >= NGATEWAYS)
|
||||||
bb_error_msg_and_die("No more than %d gateways", NGATEWAYS);
|
bb_error_msg_and_die("no more than %d gateways", NGATEWAYS);
|
||||||
getaddr(gwlist + lsrr, l_sr->data);
|
getaddr(gwlist + lsrr, l_sr->data);
|
||||||
++lsrr;
|
++lsrr;
|
||||||
l_sr = l_sr->link;
|
l_sr = l_sr->link;
|
||||||
|
@ -271,7 +271,6 @@ static void input_backward(int num)
|
|||||||
if (num < 4)
|
if (num < 4)
|
||||||
while (num-- > 0)
|
while (num-- > 0)
|
||||||
putchar('\b');
|
putchar('\b');
|
||||||
|
|
||||||
else
|
else
|
||||||
printf("\033[%dD", num);
|
printf("\033[%dD", num);
|
||||||
} else {
|
} else {
|
||||||
@ -1081,8 +1080,8 @@ static void input_tab(int *lastWasTab)
|
|||||||
int i, j, n, srt;
|
int i, j, n, srt;
|
||||||
/* bubble */
|
/* bubble */
|
||||||
n = num_matches;
|
n = num_matches;
|
||||||
for(i=0; i<(n-1); i++)
|
for(i=0; i<(n-1); i++) {
|
||||||
for(j=i+1; j<n; j++)
|
for(j=i+1; j<n; j++) {
|
||||||
if(matches[i]!=NULL && matches[j]!=NULL) {
|
if(matches[i]!=NULL && matches[j]!=NULL) {
|
||||||
srt = strcmp(matches[i], matches[j]);
|
srt = strcmp(matches[i], matches[j]);
|
||||||
if(srt == 0) {
|
if(srt == 0) {
|
||||||
@ -1097,6 +1096,8 @@ static void input_tab(int *lastWasTab)
|
|||||||
add_char_to_match[j] = srt;
|
add_char_to_match[j] = srt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
j = n;
|
j = n;
|
||||||
n = 0;
|
n = 0;
|
||||||
for(i=0; i<j; i++)
|
for(i=0; i<j; i++)
|
||||||
|
@ -47,7 +47,7 @@ struct format_descr {
|
|||||||
|
|
||||||
static void xioctl(int fd, int request, void *argp, const char *string)
|
static void xioctl(int fd, int request, void *argp, const char *string)
|
||||||
{
|
{
|
||||||
if (ioctl (fd, request, argp) < 0) {
|
if (ioctl(fd, request, argp) < 0) {
|
||||||
bb_perror_msg_and_die(string);
|
bb_perror_msg_and_die(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,17 +67,16 @@ int fdformat_main(int argc,char **argv)
|
|||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
/* R_OK is needed for verifying */
|
/* R_OK is needed for verifying */
|
||||||
if (stat(*argv,&st) < 0 || access(*argv,W_OK | R_OK ) < 0) {
|
if (stat(*argv, &st) < 0 || access(*argv, W_OK | R_OK ) < 0) {
|
||||||
bb_perror_msg_and_die("%s",*argv);
|
bb_perror_msg_and_die("%s", *argv);
|
||||||
}
|
}
|
||||||
if (!S_ISBLK(st.st_mode)) {
|
if (!S_ISBLK(st.st_mode)) {
|
||||||
bb_error_msg_and_die("%s: not a block device",*argv);
|
bb_error_msg_and_die("%s: not a block device", *argv);
|
||||||
/* do not test major - perhaps this was an USB floppy */
|
/* do not test major - perhaps this was an USB floppy */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* O_RDWR for formatting and verifying */
|
/* O_RDWR for formatting and verifying */
|
||||||
fd = xopen(*argv,O_RDWR );
|
fd = xopen(*argv, O_RDWR);
|
||||||
|
|
||||||
xioctl(fd, FDGETPRM, ¶m, "FDGETPRM");/*original message was: "Could not determine current format type" */
|
xioctl(fd, FDGETPRM, ¶m, "FDGETPRM");/*original message was: "Could not determine current format type" */
|
||||||
|
|
||||||
@ -86,44 +85,45 @@ int fdformat_main(int argc,char **argv)
|
|||||||
param.track, param.sect, param.size >> 1);
|
param.track, param.sect, param.size >> 1);
|
||||||
|
|
||||||
/* FORMAT */
|
/* FORMAT */
|
||||||
printf("Formatting ... ");
|
printf("Formatting... ");
|
||||||
xioctl(fd, FDFMTBEG,NULL,"FDFMTBEG");
|
xioctl(fd, FDFMTBEG, NULL, "FDFMTBEG");
|
||||||
|
|
||||||
/* n == track */
|
/* n == track */
|
||||||
for (n = 0; n < param.track; n++)
|
for (n = 0; n < param.track; n++) {
|
||||||
{
|
|
||||||
descr.head = 0;
|
descr.head = 0;
|
||||||
descr.track = n;
|
descr.track = n;
|
||||||
xioctl(fd, FDFMTTRK,&descr,"FDFMTTRK");
|
xioctl(fd, FDFMTTRK, &descr, "FDFMTTRK");
|
||||||
printf("%3d\b\b\b", n);
|
printf("%3d\b\b\b", n);
|
||||||
if (param.head == 2) {
|
if (param.head == 2) {
|
||||||
descr.head = 1;
|
descr.head = 1;
|
||||||
xioctl(fd, FDFMTTRK,&descr,"FDFMTTRK");
|
xioctl(fd, FDFMTTRK, &descr, "FDFMTTRK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xioctl(fd,FDFMTEND,NULL,"FDFMTEND");
|
xioctl(fd, FDFMTEND, NULL, "FDFMTEND");
|
||||||
printf("done\n");
|
printf("done\n");
|
||||||
|
|
||||||
/* VERIFY */
|
/* VERIFY */
|
||||||
if(verify) {
|
if (verify) {
|
||||||
/* n == cyl_size */
|
/* n == cyl_size */
|
||||||
n = param.sect*param.head*512;
|
n = param.sect*param.head*512;
|
||||||
|
|
||||||
data = xmalloc(n);
|
data = xmalloc(n);
|
||||||
printf("Verifying ... ");
|
printf("Verifying... ");
|
||||||
for (cyl = 0; cyl < param.track; cyl++) {
|
for (cyl = 0; cyl < param.track; cyl++) {
|
||||||
printf("%3d\b\b\b", cyl);
|
printf("%3d\b\b\b", cyl);
|
||||||
if((read_bytes = safe_read(fd,data,n))!= n ) {
|
read_bytes = safe_read(fd, data, n);
|
||||||
if(read_bytes < 0) {
|
if (read_bytes != n) {
|
||||||
|
if (read_bytes < 0) {
|
||||||
bb_perror_msg(bb_msg_read_error);
|
bb_perror_msg(bb_msg_read_error);
|
||||||
}
|
}
|
||||||
bb_error_msg_and_die("Problem reading cylinder %d, expected %d, read %d", cyl, n, read_bytes);
|
bb_error_msg_and_die("problem reading cylinder %d, expected %d, read %d", cyl, n, read_bytes);
|
||||||
|
// FIXME: maybe better seek & continue??
|
||||||
}
|
}
|
||||||
/* Check backwards so we don't need a counter */
|
/* Check backwards so we don't need a counter */
|
||||||
while(--read_bytes>=0) {
|
while (--read_bytes >= 0) {
|
||||||
if( data[read_bytes] != FD_FILL_BYTE) {
|
if (data[read_bytes] != FD_FILL_BYTE) {
|
||||||
printf("bad data in cyl %d\nContinuing ... ",cyl);
|
printf("bad data in cyl %d\nContinuing... ",cyl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4506,8 +4506,7 @@ change_sysid(void)
|
|||||||
label_sun != current_label_type && !get_nr_sects(p))
|
label_sun != current_label_type && !get_nr_sects(p))
|
||||||
{
|
{
|
||||||
printf(_("Partition %d does not exist yet!\n"), i + 1);
|
printf(_("Partition %d does not exist yet!\n"), i + 1);
|
||||||
}else{
|
} else while (1) {
|
||||||
while (1) {
|
|
||||||
sys = read_hex (get_sys_types());
|
sys = read_hex (get_sys_types());
|
||||||
|
|
||||||
if (!sys && label_sgi != current_label_type &&
|
if (!sys && label_sgi != current_label_type &&
|
||||||
@ -4574,7 +4573,6 @@ change_sysid(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_FEATURE_FDISK_WRITABLE */
|
#endif /* CONFIG_FEATURE_FDISK_WRITABLE */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user