Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #104 from roidayan/fix_flashcache_load
Browse files Browse the repository at this point in the history
Fix flashcache_load getting cachedev from argv when using flags
  • Loading branch information
mohans committed Feb 27, 2013
2 parents ed198f8 + f99b7c4 commit 542a8ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/flashcache_load.c
Expand Up @@ -114,7 +114,7 @@ main(int argc, char **argv)
} }
} }


if ((argc < 2) || (argc > 3)) { if ((argc < 2) || (argc > 4)) {
usage(pname); usage(pname);
} }


Expand Down Expand Up @@ -143,10 +143,10 @@ main(int argc, char **argv)
} }


// switch to new vdev name if requested by load command // switch to new vdev name if requested by load command
if (argc == 3) { if (optind == argc) {
cachedev = argv[optind];
} else {
cachedev = sb->cache_devname; cachedev = sb->cache_devname;
} else {
cachedev = argv[optind];
} }
disk_devname = sb->disk_devname; disk_devname = sb->disk_devname;


Expand Down

0 comments on commit 542a8ec

Please sign in to comment.