git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dm ioctl: allow dm_copy_name_and_uuid to return only one field
[safe/jmp/linux-2.6]
/
drivers
/
md
/
dm-ioctl.c
diff --git
a/drivers/md/dm-ioctl.c
b/drivers/md/dm-ioctl.c
index
777c948
..
8da7a01
100644
(file)
--- a/
drivers/md/dm-ioctl.c
+++ b/
drivers/md/dm-ioctl.c
@@
-1550,8
+1550,10
@@
int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid)
goto out;
}
- strcpy(name, hc->name);
- strcpy(uuid, hc->uuid ? : "");
+ if (name)
+ strcpy(name, hc->name);
+ if (uuid)
+ strcpy(uuid, hc->uuid ? : "");
out:
up_read(&_hash_lock);