diff options
author | Alasdair Kergon <agk@redhat.com> | 2007-12-05 17:05:04 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2007-12-05 17:05:04 +0000 |
commit | 8611f8851edbe428fbef7042c85570dc72b5895a (patch) | |
tree | b70061ae225b0e9fddce5f4e3abbdb4200c417f7 /tools/dmsetup.c | |
parent | a8524c394264b60c85c6301bf94e9155f9cd5a1b (diff) | |
download | lvm2-8611f8851edbe428fbef7042c85570dc72b5895a.tar.gz lvm2-8611f8851edbe428fbef7042c85570dc72b5895a.tar.xz lvm2-8611f8851edbe428fbef7042c85570dc72b5895a.zip |
pre-release
Diffstat (limited to 'tools/dmsetup.c')
-rw-r--r-- | tools/dmsetup.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 5e569401..3432402b 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -2194,8 +2194,8 @@ static char *parse_loop_device_name(const char *dev, const char *dev_dir) /* If dev_dir does not end in a slash, ensure that the following byte in the device string is "/". */ - if (dev_dir[strlen(dev_dir) - 1] != '/' - && device[strlen(dev_dir)] != '/') + if (dev_dir[strlen(dev_dir) - 1] != '/' && + device[strlen(dev_dir)] != '/') goto error; strncpy(buf, strrchr(device, '/') + 1, (size_t) PATH_MAX); @@ -2611,12 +2611,11 @@ int main(int argc, char **argv) dev_dir = getenv ("DM_DEV_DIR"); if (dev_dir && *dev_dir) { if (!dm_set_dev_dir(dev_dir)) { - fprintf(stderr, "Invalid DM_DEV_DIR envvar value.\n"); + fprintf(stderr, "Invalid DM_DEV_DIR environment variable value.\n"); goto out; } - } else { + } else dev_dir = DEFAULT_DM_DEV_DIR; - } if (!_process_switches(&argc, &argv, dev_dir)) { fprintf(stderr, "Couldn't process command line.\n"); |