]> granicus.if.org Git - nethack/commitdiff
add EROFS case to lock_file()
authorkeni <keni>
Wed, 16 Nov 2011 16:20:45 +0000 (16:20 +0000)
committerkeni <keni>
Wed, 16 Nov 2011 16:20:45 +0000 (16:20 +0000)
From an old email: perhaps this will help users with "run from distro"
issues.

src/files.c

index ce62db20f848694b10f19cd70cf5eadf31d38947..107c20574b545465b4bdda924922426c1cf64519 100644 (file)
@@ -1636,6 +1636,15 @@ int retryct;
                nesting--;
                return FALSE;
 # endif
+           case EROFS:
+               /* take a wild guess at the underlying cause */
+               HUP perror(lockname);
+               HUP raw_printf("Cannot lock %s.", filename);
+               HUP raw_printf(
+"(Perhaps you are running NetHack from inside the distribution package?)."
+               );
+               nesting--;
+               return FALSE;
            default:
                HUP perror(lockname);
                HUP raw_printf(