mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-22 04:49:46 +01:00
unpack: rename flags
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
35fabedb49
commit
b052a12beb
3 changed files with 6 additions and 6 deletions
|
@ -122,7 +122,7 @@ static int change_permissions(int dirfd, image_entry_t *list, int flags)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & FLAG_NO_CHMOD) && !S_ISLNK(list->mode)) {
|
if (!(flags & UNPACK_NO_CHMOD) && !S_ISLNK(list->mode)) {
|
||||||
if (fchmodat(dirfd, list->name,
|
if (fchmodat(dirfd, list->name,
|
||||||
list->mode & 07777, 0)) {
|
list->mode & 07777, 0)) {
|
||||||
fprintf(stderr, "%s: chmod: %s\n", list->name,
|
fprintf(stderr, "%s: chmod: %s\n", list->name,
|
||||||
|
@ -131,7 +131,7 @@ static int change_permissions(int dirfd, image_entry_t *list, int flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & FLAG_NO_CHOWN)) {
|
if (!(flags & UNPACK_NO_CHOWN)) {
|
||||||
if (fchownat(dirfd, list->name, list->uid, list->gid,
|
if (fchownat(dirfd, list->name, list->uid, list->gid,
|
||||||
AT_SYMLINK_NOFOLLOW)) {
|
AT_SYMLINK_NOFOLLOW)) {
|
||||||
fprintf(stderr, "%s: chown: %s\n", list->name,
|
fprintf(stderr, "%s: chown: %s\n", list->name,
|
||||||
|
|
|
@ -26,10 +26,10 @@ static int cmd_unpack(int argc, char **argv)
|
||||||
root = optarg;
|
root = optarg;
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
flags |= FLAG_NO_CHOWN;
|
flags |= UNPACK_NO_CHOWN;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
flags |= FLAG_NO_CHMOD;
|
flags |= UNPACK_NO_CHMOD;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
tell_read_help(argv[0]);
|
tell_read_help(argv[0]);
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FLAG_NO_CHOWN = 0x01,
|
UNPACK_NO_CHOWN = 0x01,
|
||||||
FLAG_NO_CHMOD = 0x02,
|
UNPACK_NO_CHMOD = 0x02,
|
||||||
};
|
};
|
||||||
|
|
||||||
int mkdir_p(const char *path);
|
int mkdir_p(const char *path);
|
||||||
|
|
Loading…
Reference in a new issue