diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-10-25 12:52:49 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-10-27 10:59:45 +0100 |
commit | b01ef8eae1acc5105e623a25c8988bcc3326ea1c (patch) | |
tree | c40e5c07e4b6802bf091fb44bcfe5cb97129b12c /src | |
parent | 504c3de9fe9db97fb14f2ab8310a588fc3a04458 (diff) | |
download | libguestfs-b01ef8eae1acc5105e623a25c8988bcc3326ea1c.tar.gz libguestfs-b01ef8eae1acc5105e623a25c8988bcc3326ea1c.tar.xz libguestfs-b01ef8eae1acc5105e623a25c8988bcc3326ea1c.zip |
New API: lvm-canonical-lv-name: make LV name canonical.
When logical volume names appear in places like /etc/fstab
files they can have the form "/dev/mapper/foo-bar". This
function takes such names and makes them canonical.
Note that this operation cannot be performed using the current
API, because 'guestfs_stat' does not work on device names, and
we don't really want to make a 'stat-device' call since that
exposes too much non-useful detail about the appliance.
With this patch you can do this:
><fs> debug ll /dev/mapper
total 8
drwxrwxr-x 2 root root 4096 Oct 25 12:51 .
drwxr-xr-x 16 root root 4096 Oct 25 12:51 ..
crw------- 1 root root 10, 62 Oct 25 12:51 control
lrwxrwxrwx 1 root root 7 Oct 25 12:51 vg_f13x64-lv_root -> ../dm-0
lrwxrwxrwx 1 root root 7 Oct 25 12:51 vg_f13x64-lv_swap -> ../dm-1
><fs> lvm-canonical-lv-name /dev/mapper/vg_f13x64-lv_root
/dev/vg_f13x64/lv_root
><fs> lvm-canonical-lv-name /dev/mapper/vg_f13x64-lv_swap
/dev/vg_f13x64/lv_swap
><fs> lvm-canonical-lv-name /dev/mapper/foo
libguestfs: error: lvm_canonical_lv_name: lvm_canonical_lv_name_stub: /dev/mapper/foo: No such file or directory
><fs> lvm-canonical-lv-name /dev/mapper/control
libguestfs: error: lvm_canonical_lv_name: /dev/mapper/control: not a logical volume
><fs> lvm-canonical-lv-name /dev/vg_f13x64/lv_root
/dev/vg_f13x64/lv_root
Diffstat (limited to 'src')
-rw-r--r-- | src/MAX_PROC_NR | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 15007f1b..26817477 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -276 +277 |