307
#if !defined(__FreeBSD__) && !defined(__solaris__) && !defined(USE_SOLARIS) && !defined(__irix__)
305
#if !defined(__FreeBSD__) && !defined(__solaris__) && !defined(USE_SOLARIS)
308
306
// First entry is for CIFS, the second for SMBFS.
309
307
if ( (uint)filesystem.f_type == 0xFF534D42 || (uint)filesystem.f_type == 0x517B )
311
strcpy( fs_buf, (uint)filesystem.f_type == 0xFF534D42 ? "cifs" : "smbfs" );
309
const char *fs_type = (uint)filesystem.f_type == 0xFF534D42 ? "cifs" : "smbfs";
310
(void) strncpy( fs_buf, fs_type, strlen( fs_type ) + 1 );
312
311
#elif defined(__FreeBSD__)
313
312
if ( !strcmp( filesystem.f_fstypename, "smbfs" ) )
315
strcpy( fs_buf, "smbfs" );
314
const char *fs_type = "smbfs";
315
(void) strncpy( fs_buf, fs_type, strlen( fs_type ) + 1 );
316
316
#elif defined(__solaris__) || defined(USE_SOLARIS)
317
317
if ( (uint)filesystem.f_basetype == 0xFF534D42 || (uint)filesystem.f_basetype == 0x517B )
319
strcpy( fs_buf, (uint)filesystem.f_basetype == 0xFF534D42 ? "cifs" : "smbfs" );
319
const char *fs_type = (uint)filesystem.f_basetype == 0xFF534D42 ? "cifs" : "smbfs";
320
(void) strncpy( fs_buf, fs_type, strlen( fs_type ) + 1 );
320
321
#elif defined(__irix__)
321
322
if ( (uint)filesystem.f_fstyp == 0xFF534D42 || (uint)filesystem.f_fstyp == 0x517B )
323
strcpy( fs_buf, (uint)filesystem.f_fstyp == 0xFF534D42 ? "cifs" : "smbfs" );
324
const char *fs_type = (uint)filesystem.f_fstyp == 0xFF534D42 ? "cifs" : "smbfs"
325
(void) strncpy( fs_buf, fs_type, strlen( fs_type ) + 1 );
376
378
else if ( !strcmp( argv[i], "--cifs" ) || !strcmp( argv[i], "--smbfs" ) )
378
(void) strcpy( fs_arg, argv[i] );
380
(void) strncpy( fs_arg, argv[i], 9 );
395
398
exit( EXIT_FAILURE );
398
args[k++] = strcpy( path, replace_special_characters( argv[i] ) );
401
const char *rsc = replace_special_characters( argv[i] );
402
args[k++] = strncpy( path, rsc, 499 );
416
421
if ( !strcmp( fs, "smbfs" ) )
418
args[0] = strcpy( t, findprog( "smbumount" ) );
423
const char *umnt_prg = findprog( "smbumount" );
424
args[0] = strncpy( t, umnt_prg, 254 );
420
427
else if ( !strcmp( fs, "cifs" ) )
422
args[0] = strcpy( t, findprog( "umount.cifs" ) );
429
const char *umnt_prg = findprog( "umount.cifs" );
430
args[0] = strncpy( t, umnt_prg, 254 );
427
436
// file system info.
428
437
if ( !strcmp( fs_arg, "--smbfs" ) )
430
args[0] = strcpy( t, findprog( "smbumount" ) );
439
const char *umnt_prg = findprog( "smbumount" );
440
args[0] = strncpy( t, umnt_prg, 254 );
432
443
else if ( !strcmp( fs_arg, "--cifs" ) )
434
args[0] = strcpy( t, findprog( "umount.cifs" ) );
445
const char *umnt_prg = findprog( "umount.cifs" );
446
args[0] = strncpy( t, umnt_prg, 254 );
448
461
if ( !strcmp( fs, "smbfs" ) || !strcmp( fs, "cifs" ) )
450
args[0] = strcpy( t, findprog( "umount" ) );
463
const char *umnt_prg = findprog( "umount" );
464
args[0] = strncpy( t, umnt_prg, 254 );
454
469
if ( !strcmp( fs_arg, "--smbfs" ) || !strcmp( fs_arg, "--cifs" ) )
456
args[0] = strcpy( t, findprog( "umount" ) );
471
const char *umnt_prg = findprog( "umount" );
472
args[0] = strncpy( t, umnt_prg, 254 );