diff options
author | Karel Zak | 2017-11-03 19:19:21 +0100 |
---|---|---|
committer | Karel Zak | 2017-11-03 19:19:21 +0100 |
commit | b412e860b59997cc86e63a1d7c5e26a63a61dc74 (patch) | |
tree | ae427a42cc7f266157d88ae86538df067987112c /sys-utils/nsenter.c | |
parent | lslocks: add note about OFDLCK (diff) | |
download | kernel-qcow2-util-linux-b412e860b59997cc86e63a1d7c5e26a63a61dc74.tar.gz kernel-qcow2-util-linux-b412e860b59997cc86e63a1d7c5e26a63a61dc74.tar.xz kernel-qcow2-util-linux-b412e860b59997cc86e63a1d7c5e26a63a61dc74.zip |
tests: update default lsmem output
The commit 96cbe362c034305e5f12a912b4247b3321420ee7 forces lsmem to
follow output column for split policy.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/nsenter.c')
-rw-r--r-- | sys-utils/nsenter.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c index 9c452c1d1..464f9f98c 100644 --- a/sys-utils/nsenter.c +++ b/sys-utils/nsenter.c @@ -238,6 +238,7 @@ int main(int argc, char *argv[]) int do_fork = -1; /* unknown yet */ uid_t uid = 0; gid_t gid = 0; + const char *rd_path = NULL, *wd_path = NULL; #ifdef HAVE_LIBSELINUX bool selinux = 0; #endif @@ -318,13 +319,13 @@ int main(int argc, char *argv[]) break; case 'r': if (optarg) - open_target_fd(&root_fd, "root", optarg); + rd_path = optarg; else do_rd = true; break; case 'w': if (optarg) - open_target_fd(&wd_fd, "cwd", optarg); + wd_path = optarg; else do_wd = true; break; @@ -433,6 +434,11 @@ int main(int argc, char *argv[]) } } + if (wd_path) + open_target_fd(&wd_fd, "cwd", wd_path); + if (rd_path) + open_target_fd(&root_fd, "root", rd_path); + /* Remember the current working directory if I'm not changing it */ if (root_fd >= 0 && wd_fd < 0) { wd_fd = open(".", O_RDONLY); |