12-28 snapshot on netbsd1.3H - much better luck this time

assar@stacken.kth.se assar at stacken.kth.se
Sun Jan 10 02:28:23 CET 1999


Ken Raeburn <raeburn at raeburn.org> writes:
> In the copy of src/domestic/lib/libkafs/afssysdefs.h I've got, there
> is no such definition, and the version is 1.2 dated 1995/12/17.
> Checking the netbsd-current sources on ftp.netbsd.org yields the same
> result.

I would humbly suggest you might ask NetBSD to import some more
modern code.

>     % /usr/arla/bin/fs gcpags
>     getcrypt: extraneous arguments ignored
>     fs : error Bad address (14) return from pioctl
>     %
> 
> The first message appears to be because argc should be 1 when gc_cmd
> is called with no arguments, and the printed routine name is wrong; I
> haven't looked into the second.

Exactly.  gcpags doesn't do anything at all in arla, but I added
support for it anyway. :-)

/assar


Index: appl/fs.c
===================================================================
RCS file: /usr/local/cvsroot/arla/appl/fs.c,v
retrieving revision 1.62
diff -u -w -u -w -r1.62 fs.c
--- fs.c	1999/01/04 23:08:24	1.62
+++ fs.c	1999/01/10 01:26:18
@@ -402,8 +402,11 @@
 {
     int ret;
 
+    argc--;
+    argv++;
+
     if (argc != 0)
-	printf ("getcrypt: extraneous arguments ignored\n");
+	printf ("gcpags: extraneous arguments ignored\n");
     
     ret = fs_gcpags();
     if (ret)
Index: appl/fs_lib.c
===================================================================
RCS file: /usr/local/cvsroot/arla/appl/fs_lib.c,v
retrieving revision 1.21
diff -u -w -u -w -r1.21 fs_lib.c
--- fs_lib.c	1999/01/04 21:59:13	1.21
+++ fs_lib.c	1999/01/10 01:26:39
@@ -386,7 +386,15 @@
 int
 fs_gcpags(void)
 {
-    if (k_pioctl(NULL, VIOC_GCPAGS, NULL, 0) != 0)
+    struct ViceIoctl a_params;
+
+    a_params.in_size  = 0;
+    a_params.out_size = 0;
+    a_params.in       = NULL;
+    a_params.out      = NULL;
+
+
+    if (k_pioctl(NULL, VIOC_GCPAGS, &a_params, 0) != 0)
 	return errno;
     
     return 0;
Index: arlad/messages.c
===================================================================
RCS file: /usr/local/cvsroot/arla/arlad/messages.c,v
retrieving revision 1.113
diff -u -w -u -w -r1.113 messages.c
--- messages.c	1999/01/03 08:10:57	1.113
+++ messages.c	1999/01/10 01:26:58
@@ -2870,6 +2903,16 @@
 }
 
 /*
+ * GC pags --- there shouldn't be any need to do anything here.
+ */
+
+static int
+vioc_gcpags (int fd, struct xfs_message_pioctl *h, u_int size)
+{
+    return 0;
+}
+
+/*
  * Handle a pioctl message in `h'
  */
 
@@ -2961,6 +3004,9 @@
 	return viocaviator (fd, h, size);
     case VIOC_ARLADEBUG :
 	return vioc_arladebug (fd, h, size);
+    case VIOC_GCPAGS :
+	error = vioc_gcpags (fd, h, size);
+	break;
     default:
 	arla_warnx (ADEBMSG, "unknown pioctl call %d", h->opcode);
 	error = EINVAL ;





More information about the Arla-drinkers mailing list