mirror of
https://github.com/linux-msm/rmtfs.git
synced 2026-04-09 15:02:31 +02:00
rmtfs: Fix command line argument parsing for '-o' optarg
Commit2ee01bf("storage: Try opening the slot-suffixed partition") introduced a bug where option '-o' is incorrectly specified as having no argument. Therefore, passing -o with a path incorrectly sets that path to the default '/boot' one as optarg evaluates to NULL. Fix this by telling getopt that we expect an argument. Fixes:2ee01bf("storage: Try opening the slot-suffixed partition") Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
This commit is contained in:
committed by
Bjorn Andersson
parent
f9847a777c
commit
14cb1ee69f
2
rmtfs.c
2
rmtfs.c
@@ -505,7 +505,7 @@ int main(int argc, char **argv)
|
|||||||
int option;
|
int option;
|
||||||
const char *storage_root = NULL;
|
const char *storage_root = NULL;
|
||||||
|
|
||||||
while ((option = getopt(argc, argv, "oS:Prsv")) != -1) {
|
while ((option = getopt(argc, argv, "o:S:Prsv")) != -1) {
|
||||||
switch (option) {
|
switch (option) {
|
||||||
/*
|
/*
|
||||||
* -o sets the directory where EFS images are stored,
|
* -o sets the directory where EFS images are stored,
|
||||||
|
|||||||
Reference in New Issue
Block a user