[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gopherfs ChangeLog args.c gopherfs.c gopherfs.h...
From: |
Manuel Menal |
Subject: |
gopherfs ChangeLog args.c gopherfs.c gopherfs.h... |
Date: |
Tue, 11 Apr 2006 12:12:21 +0000 |
CVSROOT: /sources/hurdextras
Module name: gopherfs
Branch:
Changes by: Manuel Menal <address@hidden> 06/04/11 12:12:21
Modified files:
. : ChangeLog args.c gopherfs.c gopherfs.h netfs.c
Log message:
Applied patch from Ben Asselstine: added a new option to specify a port.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/hurdextras/gopherfs/ChangeLog.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/hurdextras/gopherfs/args.c.diff?tr1=1.1.1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/hurdextras/gopherfs/gopherfs.c.diff?tr1=1.1.1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/hurdextras/gopherfs/gopherfs.h.diff?tr1=1.1.1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/hurdextras/gopherfs/netfs.c.diff?tr1=1.1.1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gopherfs/ChangeLog
diff -u gopherfs/ChangeLog:1.1 gopherfs/ChangeLog:1.2
--- gopherfs/ChangeLog:1.1 Tue Apr 16 01:39:20 2002
+++ gopherfs/ChangeLog Tue Apr 11 12:12:20 2006
@@ -1,3 +1,18 @@
+2002-04-15 Ben Asseltsine <address@hidden>
+
+ * args.c (parse_opt): new option to specify a port.
+ * args.c (parse_opt): setting default port when processing hostname.
+ * args.c: corrected args_doc to reflect parameter order.
+ * netfs.c: changed to use current libnetfs.
+ (netfs_attempt_set_size, netfs_attempt_read, netfs_attempt_write):
+ changed from 'off_t' to 'loff_t' in function declaration.
+ (netfs_attempt_statfs): changed from 'struct statfs' to
+ 'fsys_statfsbuf_t' in function declaration.
+ * gopherfs.c: changed to use current libnetfs. now setting
+ netfs_server_name and netfs_server_version.
+ * gopherfs.c (main): showing "attached to" output only when in
+ debug mode.
+
2002-04-15 James A. Morrison <address@hidden>
* node.c (gopherfs_make_netnode): Try to free all allocations on
Index: gopherfs/args.c
diff -u gopherfs/args.c:1.1.1.1 gopherfs/args.c:1.2
--- gopherfs/args.c:1.1.1.1 Tue Apr 16 00:40:18 2002
+++ gopherfs/args.c Tue Apr 11 12:12:20 2006
@@ -29,12 +29,13 @@
#include "gopherfs.h"
/* ARGP data */
-const char *argp_program_version = "gopherfs 0.1.2";
+const char *argp_program_version = GOPHER_SERVER_NAME " "
GOPHER_SERVER_VERSION;
const char *argp_program_bug_address = "address@hidden";
-char args_doc[] = "REMOTE_FS [SERVER]";
+char args_doc[] = "SERVER [REMOTE_FS]";
char doc[] = "Hurd gopher filesystem translator";
static const struct argp_option options[] = {
{"debug", 'D', 0, 0, "enable debug output"},
+ {"port", 'P', "NUMBER", 0, "Specify a non-standard port"},
{0}
};
/* the function that groks the arguments and fills
@@ -43,29 +44,30 @@
static error_t
parse_opt (int key, char *arg, struct argp_state *state)
{
+ char *tail;
switch (key)
{
case 'D':
debug_flag = 1;
break;
+ case 'P':
+ gopherfs_root_port = (unsigned short) strtol (arg, &tail, 10);
+ if (tail == arg || gopherfs_root_port > USHRT_MAX)
+ {
+ /* XXX bad integer conversion */
+ error (1, errno, "bad port number");
+ }
+ break;
case ARGP_KEY_ARG:
if (state->arg_num == 0)
- gopherfs_root_server = arg;
+ {
+ gopherfs_root_port = 70;
+ gopherfs_root_server = arg;
+ }
else if (state->arg_num == 1)
{
- gopherfs_root_port = 70;
gopherfs_server_dir = arg;
}
- else if (state->arg_num == 2)
- {
- char *tail;
- gopherfs_root_port = (unsigned short) strtol (arg, &tail, 10);
- if (tail == arg || gopherfs_root_port > USHRT_MAX)
- {
- /* XXX bad integer conversion */
- error (1, errno, "bad port number");
- }
- }
else
return ARGP_ERR_UNKNOWN;
break;
Index: gopherfs/gopherfs.c
diff -u gopherfs/gopherfs.c:1.1.1.1 gopherfs/gopherfs.c:1.2
--- gopherfs/gopherfs.c:1.1.1.1 Tue Apr 16 00:40:18 2002
+++ gopherfs/gopherfs.c Tue Apr 11 12:12:20 2006
@@ -37,7 +37,8 @@
char *gopherfs_server_dir;
int debug_flag;
-
+char *netfs_server_name = GOPHER_SERVER_NAME;
+char *netfs_server_version = GOPHER_SERVER_VERSION;
struct gopherfs *gopherfs; /* filesystem global pointer */
volatile struct mapped_time_value *gopherfs_maptime;
@@ -75,7 +76,8 @@
gopherfs->root =
gopherfs_make_node (GPHR_DIR, "dir", "", gopherfs_root_server,
gopherfs_root_port);
- fprintf (stderr, "attaching to %s\n", gopherfs_root_server);
+ if (debug_flag)
+ fprintf (stderr, "attaching to %s\n", gopherfs_root_server);
/* XXX */
netfs_root_node = gopherfs->root;
netfs_startup (bootstrap, 0);
Index: gopherfs/gopherfs.h
diff -u gopherfs/gopherfs.h:1.1.1.1 gopherfs/gopherfs.h:1.2
--- gopherfs/gopherfs.h:1.1.1.1 Tue Apr 16 00:40:18 2002
+++ gopherfs/gopherfs.h Tue Apr 11 12:12:20 2006
@@ -30,7 +30,8 @@
#include <netdb.h>
#include <hurd/hurd_types.h>
-
+#define GOPHER_SERVER_NAME "gopherfs"
+#define GOPHER_SERVER_VERSION "0.1.2"
/* declaration of global config parapeters */
extern char *gopherfs_root_server;
extern unsigned short gopherfs_root_port;
Index: gopherfs/netfs.c
diff -u gopherfs/netfs.c:1.1.1.1 gopherfs/netfs.c:1.2
--- gopherfs/netfs.c:1.1.1.1 Tue Apr 16 00:40:18 2002
+++ gopherfs/netfs.c Tue Apr 11 12:12:20 2006
@@ -378,7 +378,7 @@
/* This should attempt to set the size of the file NODE (for user CRED) to
SIZE bytes long. */
error_t netfs_attempt_set_size (struct iouser *cred, struct node *node,
-
off_t size)
+
loff_t size)
{
return EROFS;
}
@@ -386,7 +386,7 @@
/* This should attempt to fetch filesystem status information for the remote
filesystem, for the user CRED. */
error_t netfs_attempt_statfs (struct iouser *cred, struct node *node,
-
struct statfs *st)
+ fsys_statfsbuf_t *st)
{
return EOPNOTSUPP;
}
@@ -430,7 +430,7 @@
up to *LEN bytes. Put the data at DATA. Set *LEN to the amount
successfully read upon return. */
error_t netfs_attempt_read (struct iouser *cred, struct node *node,
-
off_t offset, size_t *len, void *data)
+
loff_t offset, size_t *len, void *data)
{
error_t err;
int remote_fd;
@@ -455,7 +455,7 @@
to *LEN bytes from DATA. Set *LEN to the amount seccessfully written upon
return. */
error_t netfs_attempt_write (struct iouser *cred, struct node *node,
-
off_t offset, size_t *len, void *data)
+
loff_t offset, size_t *len, void *data)
{
return EROFS;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gopherfs ChangeLog args.c gopherfs.c gopherfs.h...,
Manuel Menal <=