1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
$NetBSD: patch-aa,v 1.2 2008/11/23 21:50:51 hasso Exp $
--- tools/hal-storage-mount.c.orig 2008-05-08 02:24:23 +0300
+++ tools/hal-storage-mount.c 2008-11-23 13:25:17 +0200
@@ -31,7 +31,7 @@
#include <string.h>
#include <glib.h>
#include <glib/gstdio.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <fstab.h>
#include <sys/param.h>
#include <sys/ucred.h>
@@ -41,6 +41,10 @@
#elif sun
#include <sys/mnttab.h>
#include <sys/vfstab.h>
+#elif __NetBSD__
+#include <fstab.h>
+#include <sys/param.h>
+#include <sys/mount.h>
#else
#include <mntent.h>
#endif
@@ -54,10 +58,14 @@
#include "hal-storage-shared.h"
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
#define MOUNT "/sbin/mount"
#define MOUNT_OPTIONS "noexec,nosuid"
#define MOUNT_TYPE_OPT "-t"
+#elif __NetBSD__
+#define MOUNT "/sbin/mount"
+#define MOUNT_OPTIONS "noexec,nosuid,nodev"
+#define MOUNT_TYPE_OPT "-t"
#elif sun
#define MOUNT "/sbin/mount"
#define MOUNT_OPTIONS "noexec,nosuid"
@@ -421,7 +429,7 @@ device_is_mounted (const char *device, c
static const char *
map_fstype (const char *fstype)
{
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
if (! strcmp (fstype, "iso9660"))
return "cd9660";
else if (! strcmp (fstype, "ext2"))
@@ -430,6 +438,13 @@ map_fstype (const char *fstype)
return "ext2fs";
else if (! strcmp (fstype, "vfat"))
return "msdosfs";
+#elif __NetBSD__
+ if (! strcmp (fstype, "iso9660"))
+ return "cd9660";
+ else if (! strcmp (fstype, "ext2"))
+ return "ext2fs";
+ else if (! strcmp (fstype, "vfat"))
+ return "msdosfs";
#elif sun
if (! strcmp (fstype, "iso9660"))
return "hsfs";
|