116
118
struct mount_options options;
121
static void nilfs_mount_logger(int priority, const char *fmt, ...)
125
if ((verbose && priority > LOG_INFO) || priority >= LOG_INFO)
128
fprintf(stderr, "%s: ", progname);
129
vfprintf(stderr, fmt, args);
130
fputs(_("\n"), stderr);
119
134
/* Report on a single mount. */
120
135
static void print_one (const struct my_mntent *me)
446
461
if (find_opt(mc->m.mnt_opts, gcpid_opt_fmt, &pid) >= 0 &&
447
stop_cleanerd(mi->device, (pid_t)pid) < 0) {
462
nilfs_shutdown_cleanerd(mi->device, (pid_t)pid) < 0) {
448
463
error(_("%s: remount failed due to %s shutdown "
449
"failure"), progname, CLEANERD_NAME);
464
"failure"), progname, NILFS_CLEANERD_NAME);
495
510
/* because filesystem is still mounted */
496
511
if (!mi->nogc && mtab_ok) {
497
512
/* Restarting cleaner daemon */
498
if (start_cleanerd(mi->device, mi->mntdir, mi->protperiod,
513
if (nilfs_launch_cleanerd(mi->device, mi->mntdir,
514
mi->protperiod, &mi->gcpid)) {
501
516
printf(_("%s: restarted %s\n"),
502
progname, CLEANERD_NAME);
517
progname, NILFS_CLEANERD_NAME);
503
518
update_gcpid_opt(&mi->optstr, mi->gcpid);
504
519
update_mtab_entry(mi->device, mi->mntdir, fstype,
505
520
mi->optstr, 0, 0, !mi->mounted);
507
522
error(_("%s: failed to restart %s"),
508
progname, CLEANERD_NAME);
523
progname, NILFS_CLEANERD_NAME);
511
printf(_("%s not restarted\n"), CLEANERD_NAME);
526
printf(_("%s not restarted\n"), NILFS_CLEANERD_NAME);
527
542
if (!check_mtab()) {
529
printf(_("%s not started\n"), CLEANERD_NAME);
544
printf(_("%s not started\n"), NILFS_CLEANERD_NAME);
534
549
if (find_opt(mo->extra_opts, pp_opt_fmt, &pp) < 0)
535
550
pp = mi->protperiod;
537
if (start_cleanerd(mi->device, mi->mntdir, pp, &pid) < 0)
538
error(_("%s aborted"), CLEANERD_NAME);
551
if (nilfs_launch_cleanerd(mi->device, mi->mntdir, pp,
553
error(_("%s aborted"), NILFS_CLEANERD_NAME);
539
554
else if (verbose)
540
printf(_("%s: started %s\n"), progname, CLEANERD_NAME);
555
printf(_("%s: started %s\n"), progname,
556
NILFS_CLEANERD_NAME);
543
559
my_free(mi->optstr);