X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fconfig%2Fcmdline.c;h=591c1a0ff615ea3d4a74ca72eb1cb72213e5b350;hb=3655c1c6edfa65212b263fa330e0bf4809eeb5d1;hp=a16c3225fc6181d6e2ef07292189986c0688731e;hpb=2bca4f1c7e98f40ff31e9b0474ec2a2b60d59379;p=vlc diff --git a/src/config/cmdline.c b/src/config/cmdline.c index a16c3225fc..591c1a0ff6 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -278,20 +278,21 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, if( p_conf ) { /* Check if the option is deprecated */ - if( p_conf->psz_current ) + if( p_conf->b_removed ) { - if( p_conf->b_strict ) - { - fprintf(stderr, - "Warning: option --%s no longer exists.\n", - p_conf->psz_name); - continue; - } + fprintf(stderr, + "Warning: option --%s no longer exists.\n", + psz_name); + continue; + } + if( p_conf->psz_oldname + && !strcmp( p_conf->psz_oldname, psz_name) ) + { fprintf( stderr, "%s: option --%s is deprecated. Use --%s instead.\n", b_ignore_errors ? "Warning" : "Error", - p_conf->psz_name, p_conf->psz_current); + psz_name, p_conf->psz_name ); if( !b_ignore_errors ) { /*free */ @@ -303,8 +304,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, return -1; } - psz_name = (char *)p_conf->psz_current; - p_conf = config_FindConfig( p_this, psz_name ); + psz_name = p_conf->psz_name; } switch( p_conf->i_type )