don't try to pin a null rootfs.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Serge Hallyn 2012-07-31 16:04:33 +02:00 committed by Daniel Lezcano
parent 9ba8130c96
commit e99ee0decc

View File

@ -485,6 +485,9 @@ int pin_rootfs(const char *rootfs)
struct stat s;
int ret, fd;
if (rootfs == NULL || strlen(rootfs) == 0)
return 0;
if (!realpath(rootfs, absrootfs)) {
SYSERROR("failed to get real path for '%s'", rootfs);
return -1;