Remove hardcoded /dev/cdrom
Brought to you by:
solbu
Other OSes use different device names
$NetBSD: patch-src_grip.c,v 1.2 2018/03/22 13:29:11 triaxx Exp $
Add system dependent headers.
--- src/grip.c.orig 2018-01-31 15:06:36.000000000 +0000
+++ src/grip.c
@@ -26,6 +26,9 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/param.h>
+#if defined(__NetBSD__)
+#include <sys/wait.h>
+#endif
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
#include <time.h>
@@ -773,7 +776,7 @@ static void DoLoadConfig(GripInfo *ginfo
*ginfo->version='\0';
- strcpy(ginfo->cd_device,"/dev/cdrom");
+ strcpy(ginfo->cd_device,CD_DEVICE);
*ginfo->force_scsi='\0';
ginfo->local_mode=FALSE;
$NetBSD: patch-src_grip.h,v 1.3 2018/03/22 13:29:11 triaxx Exp $
--- src/grip.h.orig 2018-01-01 20:16:03.000000000 +0000
+++ src/grip.h
@@ -59,6 +59,12 @@
#endif
+#if defined(__NetBSD__)
+#define CD_DEVICE "/dev/rcd0d"
+#else
+#define CD_DEVICE "/dev/cdrom"
+#endif
+
typedef struct _grip_gui {
GtkWidget *app;
GtkWidget *winbox;
Ticket moved from /p/grip/support-requests/30/
The patch doesn't apply.