From: Matthew Dillon Date: Fri, 10 Feb 2012 02:18:45 +0000 (-0800) Subject: hammer2 - complain if the hammer2 kld module isn't loaded X-Git-Tag: v3.4.0rc~1229 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/6046b14b01c39da8e029da32a348c4e268200c3d?ds=sidebyside hammer2 - complain if the hammer2 kld module isn't loaded * Complain if the hammer2 kld module isn't loaded instead of exiting silently. --- diff --git a/sbin/mount_hammer2/mount_hammer2.c b/sbin/mount_hammer2/mount_hammer2.c index a57a49174f..7a2688ae71 100644 --- a/sbin/mount_hammer2/mount_hammer2.c +++ b/sbin/mount_hammer2/mount_hammer2.c @@ -59,13 +59,16 @@ main(int argc, char *argv[]) exit(1); error = getvfsbyname("hammer2", &vfc); + if (error) { + fprintf(stderr, "hammer2 vfs not loaded\n"); + exit(1); + } info.volume = argv[1]; info.hflags = 0; mountpt = argv[2]; error = mount(vfc.vfc_name, mountpt, mount_flags, &info); - if (error) { + if (error) perror("mount: "); - } }