mirror of
https://github.com/sheumann/hush.git
synced 2024-08-21 11:28:57 +00:00
lots of silly indent fixes
This commit is contained in:
parent
cf94446af7
commit
9275814a9e
@ -1764,7 +1764,7 @@ static char *awk_printf(node *n)
|
|||||||
is_numeric(arg) ? (char)getvar_i(arg) : *getvar_s(arg));
|
is_numeric(arg) ? (char)getvar_i(arg) : *getvar_s(arg));
|
||||||
|
|
||||||
} else if (c == 's') {
|
} else if (c == 's') {
|
||||||
s1 = getvar_s(arg);
|
s1 = getvar_s(arg);
|
||||||
qrealloc(&b, incr+i+strlen(s1), &bsize);
|
qrealloc(&b, incr+i+strlen(s1), &bsize);
|
||||||
i += sprintf(b+i, s, s1);
|
i += sprintf(b+i, s, s1);
|
||||||
|
|
||||||
@ -2434,7 +2434,7 @@ re_cont:
|
|||||||
R.d--;
|
R.d--;
|
||||||
goto r_op_change;
|
goto r_op_change;
|
||||||
case '!':
|
case '!':
|
||||||
L.d = istrue(X.v) ? 0 : 1;
|
L.d = istrue(X.v) ? 0 : 1;
|
||||||
break;
|
break;
|
||||||
case '-':
|
case '-':
|
||||||
L.d = -R.d;
|
L.d = -R.d;
|
||||||
|
@ -153,7 +153,7 @@ void sed_free_and_close_stuff(void)
|
|||||||
|
|
||||||
if(bbg.hold_space) free(bbg.hold_space);
|
if(bbg.hold_space) free(bbg.hold_space);
|
||||||
|
|
||||||
while(bbg.current_input_file<bbg.input_file_count)
|
while(bbg.current_input_file<bbg.input_file_count)
|
||||||
fclose(bbg.input_file_list[bbg.current_input_file++]);
|
fclose(bbg.input_file_list[bbg.current_input_file++]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3501,8 +3501,8 @@ key_cmd_mode:
|
|||||||
if (file_modified) {
|
if (file_modified) {
|
||||||
#ifdef CONFIG_FEATURE_VI_READONLY
|
#ifdef CONFIG_FEATURE_VI_READONLY
|
||||||
if (vi_readonly || readonly) {
|
if (vi_readonly || readonly) {
|
||||||
psbs("\"%s\" File is read only", cfn);
|
psbs("\"%s\" File is read only", cfn);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_FEATURE_VI_READONLY */
|
#endif /* CONFIG_FEATURE_VI_READONLY */
|
||||||
cnt = file_write(cfn, text, end - 1);
|
cnt = file_write(cfn, text, end - 1);
|
||||||
|
@ -233,7 +233,7 @@ static int grep_file(FILE *file)
|
|||||||
if (PRINT_MATCH_COUNTS) {
|
if (PRINT_MATCH_COUNTS) {
|
||||||
if (print_filename > 0)
|
if (print_filename > 0)
|
||||||
printf("%s:", cur_file);
|
printf("%s:", cur_file);
|
||||||
printf("%d\n", nmatches);
|
printf("%d\n", nmatches);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* grep -l: print just the filename, but only if we grepped the line in the file */
|
/* grep -l: print just the filename, but only if we grepped the line in the file */
|
||||||
|
@ -325,20 +325,20 @@ static int scan_ip_mask(const char *ipm, unsigned int *ip, unsigned int *mask)
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (*p) {
|
while (*p) {
|
||||||
if (*p < '0' || *p > '9') {
|
if (*p < '0' || *p > '9') {
|
||||||
if (*p == '.') {
|
if (*p == '.') {
|
||||||
i = scan_ip(&ipm, mask, 0);
|
i = scan_ip(&ipm, mask, 0);
|
||||||
return i != 32;
|
return i != 32;
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
i *= 10;
|
return -1;
|
||||||
i += *p - '0';
|
}
|
||||||
p++;
|
i *= 10;
|
||||||
|
i += *p - '0';
|
||||||
|
p++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i > 32 || i < 0)
|
if (i > 32 || i < 0)
|
||||||
return -1;
|
return -1;
|
||||||
msk = 0x80000000;
|
msk = 0x80000000;
|
||||||
*mask = 0;
|
*mask = 0;
|
||||||
while (i > 0) {
|
while (i > 0) {
|
||||||
@ -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,8 +1571,8 @@ 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,8 +48,8 @@ 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;
|
||||||
else if (strcmp(argv[1], "inet6") == 0)
|
else if (strcmp(argv[1], "inet6") == 0)
|
||||||
|
@ -205,12 +205,12 @@ static void handlenetoutput(int len)
|
|||||||
}
|
}
|
||||||
outbuf[j++] = *p;
|
outbuf[j++] = *p;
|
||||||
if (*p == 0xff)
|
if (*p == 0xff)
|
||||||
outbuf[j++] = 0xff;
|
outbuf[j++] = 0xff;
|
||||||
else if (*p == 0x0d)
|
else if (*p == 0x0d)
|
||||||
outbuf[j++] = 0x00;
|
outbuf[j++] = 0x00;
|
||||||
}
|
}
|
||||||
if (j > 0 )
|
if (j > 0 )
|
||||||
write(G.netfd, outbuf, j);
|
write(G.netfd, outbuf, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ send_probe(int seq, int ttl, struct timeval *tp)
|
|||||||
outicmp->icmp_cksum = 0xffff;
|
outicmp->icmp_cksum = 0xffff;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (doipcksum) {
|
if (doipcksum) {
|
||||||
/* Checksum (we must save and restore ip header) */
|
/* Checksum (we must save and restore ip header) */
|
||||||
tip = *outip;
|
tip = *outip;
|
||||||
ui = (struct udpiphdr *)outip;
|
ui = (struct udpiphdr *)outip;
|
||||||
@ -788,7 +788,7 @@ packet_ok(unsigned char *buf, int cc, struct sockaddr_in *from, int seq)
|
|||||||
return (type == ICMP_TIMXCEED ? -1 : code + 1);
|
return (type == ICMP_TIMXCEED ? -1 : code + 1);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
up = (struct udphdr *)((unsigned char *)hip + hlen);
|
up = (struct udphdr *)((unsigned char *)hip + hlen);
|
||||||
/* XXX 8 is a magic number */
|
/* XXX 8 is a magic number */
|
||||||
if (hlen + 12 <= cc &&
|
if (hlen + 12 <= cc &&
|
||||||
@ -996,11 +996,11 @@ traceroute_main(int argc, char *argv[])
|
|||||||
if(nprobes_str)
|
if(nprobes_str)
|
||||||
nprobes = str2val(nprobes_str, "nprobes", 1, -1);
|
nprobes = str2val(nprobes_str, "nprobes", 1, -1);
|
||||||
if(source) {
|
if(source) {
|
||||||
/*
|
/*
|
||||||
* 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;
|
||||||
|
163
shell/cmdedit.c
163
shell/cmdedit.c
@ -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 {
|
||||||
@ -370,7 +369,7 @@ static void parse_prompt(const char *prmt_ptr)
|
|||||||
pbuf = buf2;
|
pbuf = buf2;
|
||||||
*pbuf = '~';
|
*pbuf = '~';
|
||||||
strcpy(pbuf+1, pwd_buf+l);
|
strcpy(pbuf+1, pwd_buf+l);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'W':
|
case 'W':
|
||||||
@ -712,7 +711,7 @@ static char *add_quote_for_spec_chars(char *found, int add)
|
|||||||
s[l++] = *found++;
|
s[l++] = *found++;
|
||||||
}
|
}
|
||||||
if(add)
|
if(add)
|
||||||
s[l++] = (char)add;
|
s[l++] = (char)add;
|
||||||
s[l] = 0;
|
s[l] = 0;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@ -995,7 +994,7 @@ static void showfiles(void)
|
|||||||
for (row = 0; row < nrows; row++) {
|
for (row = 0; row < nrows; row++) {
|
||||||
l = strlen(matches[row]);
|
l = strlen(matches[row]);
|
||||||
if(add_char_to_match[row])
|
if(add_char_to_match[row])
|
||||||
l++;
|
l++;
|
||||||
if (column_width < l)
|
if (column_width < l)
|
||||||
column_width = l;
|
column_width = l;
|
||||||
}
|
}
|
||||||
@ -1021,8 +1020,8 @@ static void showfiles(void)
|
|||||||
printf("%s%s", matches[n], str_add_chr);
|
printf("%s%s", matches[n], str_add_chr);
|
||||||
l = strlen(matches[n]);
|
l = strlen(matches[n]);
|
||||||
while(l < acol) {
|
while(l < acol) {
|
||||||
putchar(' ');
|
putchar(' ');
|
||||||
l++;
|
l++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
str_add_chr[0] = add_char_to_match[n];
|
str_add_chr[0] = add_char_to_match[n];
|
||||||
@ -1081,30 +1080,32 @@ 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) {
|
||||||
free(matches[j]);
|
free(matches[j]);
|
||||||
matches[j]=0;
|
matches[j]=0;
|
||||||
} else if(srt > 0) {
|
} else if(srt > 0) {
|
||||||
tmp1 = matches[i];
|
tmp1 = matches[i];
|
||||||
matches[i] = matches[j];
|
matches[i] = matches[j];
|
||||||
matches[j] = tmp1;
|
matches[j] = tmp1;
|
||||||
srt = add_char_to_match[i];
|
srt = add_char_to_match[i];
|
||||||
add_char_to_match[i] = add_char_to_match[j];
|
add_char_to_match[i] = add_char_to_match[j];
|
||||||
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++)
|
||||||
if(matches[i]) {
|
if(matches[i]) {
|
||||||
matches[n]=matches[i];
|
matches[n]=matches[i];
|
||||||
add_char_to_match[n]=add_char_to_match[i];
|
add_char_to_match[n]=add_char_to_match[i];
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
num_matches = n;
|
num_matches = n;
|
||||||
}
|
}
|
||||||
/* Did we find exactly one match? */
|
/* Did we find exactly one match? */
|
||||||
@ -1623,61 +1624,61 @@ prepare_to_die:
|
|||||||
/* fall through */
|
/* fall through */
|
||||||
case 'd'|vbit:
|
case 'd'|vbit:
|
||||||
{
|
{
|
||||||
int nc, sc;
|
int nc, sc;
|
||||||
sc = cursor;
|
sc = cursor;
|
||||||
prevc = ic;
|
prevc = ic;
|
||||||
if (safe_read(0, &c, 1) < 1)
|
if (safe_read(0, &c, 1) < 1)
|
||||||
goto prepare_to_die;
|
goto prepare_to_die;
|
||||||
if (c == (prevc & 0xff)) {
|
if (c == (prevc & 0xff)) {
|
||||||
/* "cc", "dd" */
|
/* "cc", "dd" */
|
||||||
input_backward(cursor);
|
input_backward(cursor);
|
||||||
goto clear_to_eol;
|
goto clear_to_eol;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case 'w':
|
case 'w':
|
||||||
case 'W':
|
case 'W':
|
||||||
case 'e':
|
case 'e':
|
||||||
case 'E':
|
case 'E':
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'w': /* "dw", "cw" */
|
case 'w': /* "dw", "cw" */
|
||||||
vi_word_motion(command, vi_cmdmode);
|
vi_word_motion(command, vi_cmdmode);
|
||||||
break;
|
break;
|
||||||
case 'W': /* 'dW', 'cW' */
|
case 'W': /* 'dW', 'cW' */
|
||||||
vi_Word_motion(command, vi_cmdmode);
|
vi_Word_motion(command, vi_cmdmode);
|
||||||
break;
|
break;
|
||||||
case 'e': /* 'de', 'ce' */
|
case 'e': /* 'de', 'ce' */
|
||||||
vi_end_motion(command);
|
vi_end_motion(command);
|
||||||
input_forward();
|
input_forward();
|
||||||
break;
|
break;
|
||||||
case 'E': /* 'dE', 'cE' */
|
case 'E': /* 'dE', 'cE' */
|
||||||
vi_End_motion(command);
|
vi_End_motion(command);
|
||||||
input_forward();
|
input_forward();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
nc = cursor;
|
nc = cursor;
|
||||||
input_backward(cursor - sc);
|
input_backward(cursor - sc);
|
||||||
while (nc-- > cursor)
|
while (nc-- > cursor)
|
||||||
input_delete(1);
|
input_delete(1);
|
||||||
break;
|
break;
|
||||||
case 'b': /* "db", "cb" */
|
case 'b': /* "db", "cb" */
|
||||||
case 'B': /* implemented as B */
|
case 'B': /* implemented as B */
|
||||||
if (c == 'b')
|
if (c == 'b')
|
||||||
vi_back_motion(command);
|
vi_back_motion(command);
|
||||||
else
|
else
|
||||||
vi_Back_motion(command);
|
vi_Back_motion(command);
|
||||||
while (sc-- > cursor)
|
while (sc-- > cursor)
|
||||||
input_delete(1);
|
input_delete(1);
|
||||||
break;
|
break;
|
||||||
case ' ': /* "d ", "c " */
|
case ' ': /* "d ", "c " */
|
||||||
input_delete(1);
|
input_delete(1);
|
||||||
break;
|
break;
|
||||||
case '$': /* "d$", "c$" */
|
case '$': /* "d$", "c$" */
|
||||||
clear_to_eol:
|
clear_to_eol:
|
||||||
while (cursor < len)
|
while (cursor < len)
|
||||||
input_delete(1);
|
input_delete(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'p'|vbit:
|
case 'p'|vbit:
|
||||||
|
@ -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 &&
|
||||||
@ -4573,7 +4572,6 @@ change_sysid(void)
|
|||||||
dos_changed = 1;
|
dos_changed = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_FEATURE_FDISK_WRITABLE */
|
#endif /* CONFIG_FEATURE_FDISK_WRITABLE */
|
||||||
|
@ -250,7 +250,7 @@ int mdev_main(int argc, char *argv[])
|
|||||||
} else {
|
} else {
|
||||||
action = getenv("ACTION");
|
action = getenv("ACTION");
|
||||||
env_path = getenv("DEVPATH");
|
env_path = getenv("DEVPATH");
|
||||||
if (!action || !env_path)
|
if (!action || !env_path)
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
|
|
||||||
sprintf(temp, "/sys%s", env_path);
|
sprintf(temp, "/sys%s", env_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user