Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions src/udevil.c
Original file line number Diff line number Diff line change
Expand Up @@ -5175,7 +5175,8 @@ printf("\n-----------------------\n");
}
}
else if ( !strcmp( arg, "unmount" ) || !strcmp( arg, "--unmount" )
|| !strcmp( arg, "umount" ) || !strcmp( arg, "--umount" ) )
|| !strcmp( arg, "umount" )
|| !strcmp( arg, "--umount" ) )
{
data->cmd_type = CMD_UNMOUNT;
if ( arg_next )
Expand Down Expand Up @@ -5203,7 +5204,7 @@ printf("\n-----------------------\n");
}
}
else if ( !strcmp( arg, "info" ) || !strcmp( arg, "--show-info" )
|| !strcmp( arg, "--info" ) )
|| !strcmp( arg, "--info" ) )
{
data->cmd_type = CMD_INFO;
if ( arg_next )
Expand All @@ -5229,7 +5230,7 @@ printf("\n-----------------------\n");
else if ( !strcmp( arg, "--quiet" ) )
verbose = 2;
else if ( !strcmp( arg, "help" ) || !strcmp( arg, "--help" )
|| !strcmp( arg, "-h" ) )
|| !strcmp( arg, "-h" ) )
{
dump_log();
drop_privileges( 1 );
Expand All @@ -5250,8 +5251,8 @@ printf("\n-----------------------\n");
ac += next_inc;
}
else if ( !strcmp( arg, "-t" ) || !strcmp( arg, "--filesystem-type" )
|| !strcmp( arg, "--types" )
|| !strcmp( arg, "--mount-fstype" ) )
|| !strcmp( arg, "--types" )
|| !strcmp( arg, "--mount-fstype" ) )
{
if ( !arg_next )
goto _reject_missing_arg;
Expand All @@ -5261,7 +5262,7 @@ printf("\n-----------------------\n");
ac += next_inc;
}
else if ( !strcmp( arg, "-o" ) || !strcmp( arg, "--options" )
|| !strcmp( arg, "--mount-options" ) )
|| !strcmp( arg, "--mount-options" ) )
{
if ( !arg_next )
goto _reject_missing_arg;
Expand All @@ -5288,6 +5289,24 @@ printf("\n-----------------------\n");
data->uuid = g_strdup( arg_next );
ac += next_inc;
}
else if ( !strcmp( arg, "--source" ) )
{
if ( !arg_next )
goto _reject_missing_arg;
if ( data->device_file )
goto _reject_too_many;
data->device_file = g_strdup( arg_next );
ac += next_inc;
}
else if ( !strcmp( arg, "--target" ) )
{
if ( !arg_next )
goto _reject_missing_arg;
if ( data->point )
goto _reject_too_many;
data->point = g_strdup( arg_next );
ac += next_inc;
}
else if ( !strcmp( arg, "--no-user-interaction" ) )
{
// ignore
Expand Down