uudecode: special-case "/dev/stdout", closes 14241
function old new delta uudecode_main 295 322 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
27df6aeef2
commit
c7b90dc4d1
@ -155,7 +155,16 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dst_stream = stdout;
|
dst_stream = stdout;
|
||||||
if (NOT_LONE_DASH(outname)) {
|
if (NOT_LONE_DASH(outname)
|
||||||
|
/* https://pubs.opengroup.org/onlinepubs/9699919799/utilities/uudecode.html
|
||||||
|
* https://pubs.opengroup.org/onlinepubs/9699919799/utilities/uuencode.html
|
||||||
|
* The above says that output file name specified in input file
|
||||||
|
* or overridden by -o OUTFILE can be special "/dev/stdout" string.
|
||||||
|
* This usually works "implicitly": many systems have /dev/stdout.
|
||||||
|
* If ENABLE_DESKTOP, support that explicitly:
|
||||||
|
*/
|
||||||
|
&& (!ENABLE_DESKTOP || strcmp(outname, "/dev/stdout") != 0)
|
||||||
|
) {
|
||||||
dst_stream = xfopen_for_write(outname);
|
dst_stream = xfopen_for_write(outname);
|
||||||
fchmod(fileno(dst_stream), mode & (S_IRWXU | S_IRWXG | S_IRWXO));
|
fchmod(fileno(dst_stream), mode & (S_IRWXU | S_IRWXG | S_IRWXO));
|
||||||
}
|
}
|
||||||
|
@ -690,7 +690,7 @@ uniq Busybox specific options:
|
|||||||
|
|
||||||
uudecode POSIX options
|
uudecode POSIX options
|
||||||
option | exists | compliant | remarks
|
option | exists | compliant | remarks
|
||||||
-o outfile | no | no |
|
-o outfile | yes | no |
|
||||||
uudecode Busybox specific options: None
|
uudecode Busybox specific options: None
|
||||||
|
|
||||||
uuencode POSIX options
|
uuencode POSIX options
|
||||||
|
Loading…
Reference in New Issue
Block a user