X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/1186caba41c57c390db2aee650d9c451809bffa3..HEAD:/BUSYBOX/chmod/vtchmod.c?ds=sidebyside diff --git a/BUSYBOX/chmod/vtchmod.c b/BUSYBOX/chmod/vtchmod.c index 5a9d833..ad10d0e 100644 --- a/BUSYBOX/chmod/vtchmod.c +++ b/BUSYBOX/chmod/vtchmod.c @@ -1,5 +1,8 @@ +#include +#include #include #include +#include int main(int argc, char **argv) { @@ -7,7 +10,25 @@ int main(int argc, char **argv) { return 1; } - + + if (argv[1][0] == '-' && argv[1][1] == '6') + { + struct utsname buf; + if (0 == uname(&buf)) + { + if (strstr(buf.machine, "amd64")) + { + return 0; + } + + if (strstr(buf.machine, "x86_64")) + { + return 0; + } + } + return 1; + } + return chmod(argv[1], 0777); }