Hi folks,
we recently had a bug filed against the nbd Fedora package claiming
about the clarity of the error message which is printed when the nbd
module is not loaded:
https://bugzilla.redhat.com/show_bug.cgi?id=496751
What about merging a tiny patch I attached?
Regards,
Milos
if (strcmp(argv[0], "-d")==0) {
nbd = open(argv[1], O_RDWR);
if (nbd < 0)
- err("Can not open NBD: %m");
+ err("Cannot open NBD: %m\nPlease ensure the 'nbd' module is loaded.");
printf("Disconnecting: que, ");
if (ioctl(nbd, NBD_CLEAR_QUE)< 0)
err("Ioctl failed: %m\n");
nbddev = argv[0];
nbd = open(nbddev, O_RDWR);
if (nbd < 0)
- err("Can not open NBD: %m");
+ err("Cannot open NBD: %m\nPlease ensure the 'nbd' module is loaded.");
++argv; --argc; /* skip device */
if (argc>3) goto errmsg;