diff options
author | Ron Yorston <rmy@pobox.com> | 2021-11-14 09:41:04 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-11-14 09:42:03 +0000 |
commit | 3da297a49ccb53b2940454492b3893a493e59614 (patch) | |
tree | 580c28fbd9ce09b64a7e7065534c6f96fa405684 /archival | |
parent | 0acd7c7984e680f2e352ed43556b2f4cc8da2fbb (diff) | |
download | busybox-w32-3da297a49ccb53b2940454492b3893a493e59614.tar.gz busybox-w32-3da297a49ccb53b2940454492b3893a493e59614.tar.bz2 busybox-w32-3da297a49ccb53b2940454492b3893a493e59614.zip |
rpm: code shrink
Since the WIN32 implementation of chown(2) does nothing there's no
point in calling it.
Saves 112 bytes.
Diffstat (limited to 'archival')
-rw-r--r-- | archival/rpm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/archival/rpm.c b/archival/rpm.c index 63d13d0e1..d83c33137 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -249,6 +249,7 @@ static void fileaction_dobackup(char *filename, int fileref) | |||
249 | } | 249 | } |
250 | } | 250 | } |
251 | 251 | ||
252 | #if !ENABLE_PLATFORM_MINGW32 | ||
252 | static void fileaction_setowngrp(char *filename, int fileref) | 253 | static void fileaction_setowngrp(char *filename, int fileref) |
253 | { | 254 | { |
254 | /* real rpm warns: "user foo does not exist - using <you>" */ | 255 | /* real rpm warns: "user foo does not exist - using <you>" */ |
@@ -258,6 +259,7 @@ static void fileaction_setowngrp(char *filename, int fileref) | |||
258 | int gid = gr ? gr->gr_gid : getgid(); | 259 | int gid = gr ? gr->gr_gid : getgid(); |
259 | chown(filename, uid, gid); | 260 | chown(filename, uid, gid); |
260 | } | 261 | } |
262 | #endif | ||
261 | 263 | ||
262 | static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref)) | 264 | static void loop_through_files(int filetag, void (*fileaction)(char *filename, int fileref)) |
263 | { | 265 | { |
@@ -422,8 +424,10 @@ int rpm_main(int argc, char **argv) | |||
422 | loop_through_files(TAG_BASENAMES, fileaction_dobackup); | 424 | loop_through_files(TAG_BASENAMES, fileaction_dobackup); |
423 | /* Extact the archive */ | 425 | /* Extact the archive */ |
424 | extract_cpio(rpm_fd, source_rpm); | 426 | extract_cpio(rpm_fd, source_rpm); |
427 | #if !ENABLE_PLATFORM_MINGW32 | ||
425 | /* Set the correct file uid/gid's */ | 428 | /* Set the correct file uid/gid's */ |
426 | loop_through_files(TAG_BASENAMES, fileaction_setowngrp); | 429 | loop_through_files(TAG_BASENAMES, fileaction_setowngrp); |
430 | #endif | ||
427 | } | 431 | } |
428 | else | 432 | else |
429 | if ((func & (rpm_query|rpm_query_package)) == (rpm_query|rpm_query_package)) { | 433 | if ((func & (rpm_query|rpm_query_package)) == (rpm_query|rpm_query_package)) { |