Avoid symbol naming conflict with libm
This commit is contained in:
parent
ebce2daa60
commit
ab26cc3d8a
@ -57,7 +57,7 @@ int dd_main(int argc, char **argv)
|
|||||||
off_t skip = 0;
|
off_t skip = 0;
|
||||||
int sync_flag = FALSE;
|
int sync_flag = FALSE;
|
||||||
int noerror = FALSE;
|
int noerror = FALSE;
|
||||||
int trunc = TRUE;
|
int trunc_flag = TRUE;
|
||||||
int oflag;
|
int oflag;
|
||||||
int ifd;
|
int ifd;
|
||||||
int ofd;
|
int ofd;
|
||||||
@ -83,7 +83,7 @@ int dd_main(int argc, char **argv)
|
|||||||
buf = argv[i]+5;
|
buf = argv[i]+5;
|
||||||
while (1) {
|
while (1) {
|
||||||
if (strncmp("notrunc", buf, 7) == 0) {
|
if (strncmp("notrunc", buf, 7) == 0) {
|
||||||
trunc = FALSE;
|
trunc_flag = FALSE;
|
||||||
buf += 7;
|
buf += 7;
|
||||||
} else if (strncmp("sync", buf, 4) == 0) {
|
} else if (strncmp("sync", buf, 4) == 0) {
|
||||||
sync_flag = TRUE;
|
sync_flag = TRUE;
|
||||||
@ -115,7 +115,7 @@ int dd_main(int argc, char **argv)
|
|||||||
if (outfile != NULL) {
|
if (outfile != NULL) {
|
||||||
oflag = O_WRONLY | O_CREAT;
|
oflag = O_WRONLY | O_CREAT;
|
||||||
|
|
||||||
if (!seek && trunc) {
|
if (!seek && trunc_flag) {
|
||||||
oflag |= O_TRUNC;
|
oflag |= O_TRUNC;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ int dd_main(int argc, char **argv)
|
|||||||
bb_perror_msg_and_die("%s", outfile);
|
bb_perror_msg_and_die("%s", outfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seek && trunc) {
|
if (seek && trunc_flag) {
|
||||||
if (ftruncate(ofd, seek * bs) < 0) {
|
if (ftruncate(ofd, seek * bs) < 0) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user