Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/lib/popt_common.c

    r414 r745  
    2222
    2323#include "includes.h"
     24#include "system/filesys.h"
     25#include "popt_common.h"
    2426
    2527/* Handle command line options:
     
    3436 */
    3537
    36 extern bool AllowDebugChange;
     38enum {OPT_OPTION=1};
     39
    3740extern bool override_logfile;
    3841
     
    9699
    97100        switch(opt->val) {
     101        case OPT_OPTION:
     102                if (!lp_set_option(arg)) {
     103                        fprintf(stderr, "Error setting option '%s'\n", arg);
     104                        exit(1);
     105                }
     106                break;
     107
    98108        case 'd':
    99109                if (arg) {
    100                         debug_parse_levels(arg);
    101                         AllowDebugChange = False;
     110                        lp_set_cmdline("log level", arg);
    102111                }
    103112                break;
     
    164173        { "log-basename", 'l', POPT_ARG_STRING, NULL, 'l', "Base name for log files", "LOGFILEBASE" },
    165174        { "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" },
     175        { "option",         0, POPT_ARG_STRING, NULL, OPT_OPTION, "Set smb.conf option from command line", "name=value" },
    166176        POPT_TABLEEND
    167177};
     
    185195};
    186196
     197struct poptOption popt_common_option[] = {
     198        { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_POST, (void *)popt_common_callback },
     199        { "option",         0, POPT_ARG_STRING, NULL, OPT_OPTION, "Set smb.conf option from command line", "name=value" },
     200        POPT_TABLEEND
     201};
    187202
    188203/* Handle command line options:
Note: See TracChangeset for help on using the changeset viewer.