7
static void usage(void)
10
smbw_sample - a sample program that uses smbw
12
smbw_sample <options> path
22
note that path must start with /smb/
26
int main(int argc, char *argv[])
36
lp_load(dyn_CONFIGFILE,1,0,0,1);
39
while ((opt = getopt(argc, argv, "W:U:R:d:P:l:hL:")) != EOF) {
42
smbw_setshared("WORKGROUP", optarg);
45
smbw_setshared("LOGFILE", optarg);
48
smbw_setshared("PREFIX", optarg);
51
smbw_setshared("DEBUG", optarg);
54
p = strchr_m(optarg,'%');
57
smbw_setshared("PASSWORD",p+1);
59
smbw_setshared("USER", optarg);
62
smbw_setshared("RESOLVE_ORDER",optarg);
83
dir = smbw_opendir(path);
85
printf("failed to open %s\n", path);
89
while ((dent = smbw_readdir(dir))) {
90
printf("%s\n", dent->d_name);