diff options
author | pav <pav@FreeBSD.org> | 2004-07-03 07:21:53 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-07-03 07:21:53 +0800 |
commit | 43055d61af5e76cd91487655617237075ca2426e (patch) | |
tree | 1133ef4c7f70f1be458e17098ad311fde42db1b8 /net | |
parent | 0b73f1de0a57f59b6f5d14188013383154b21c86 (diff) | |
download | freebsd-ports-gnome-43055d61af5e76cd91487655617237075ca2426e.tar.gz freebsd-ports-gnome-43055d61af5e76cd91487655617237075ca2426e.tar.zst freebsd-ports-gnome-43055d61af5e76cd91487655617237075ca2426e.zip |
- Update to 2.7.1
PR: ports/68575
Submitted by: Wouter Verhelst <wouter@grep.be>
Modified by: Christian Laursen <xi@borderworlds.dk> (maintainer)
Diffstat (limited to 'net')
-rw-r--r-- | net/nbd-server/Makefile | 10 | ||||
-rw-r--r-- | net/nbd-server/distinfo | 4 | ||||
-rw-r--r-- | net/nbd-server/files/nbd.h | 62 | ||||
-rw-r--r-- | net/nbd-server/files/patch-include | 11 | ||||
-rw-r--r-- | net/nbd-server/files/patch-mans | 20 |
5 files changed, 48 insertions, 59 deletions
diff --git a/net/nbd-server/Makefile b/net/nbd-server/Makefile index 228f29b180e5..d539d5d678c2 100644 --- a/net/nbd-server/Makefile +++ b/net/nbd-server/Makefile @@ -6,22 +6,18 @@ # PORTNAME= nbd-server -PORTVERSION= 2.6.0 -PORTREVISION= 1 +PORTVERSION= 2.7.1 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= nbd -DISTNAME= nbd-${PORTVERSION} +DISTNAME= nbd-${PORTVERSION} MAINTAINER= xi@borderworlds.dk COMMENT= A server for the linux network block device (nbd) -WRKSRC= ${WRKDIR}/nbd-2.6 - HAS_CONFIGURE= yes PLIST_FILES= bin/nbd-server -CONFIGURE_ARGS+= --prefix=${PREFIX} -USE_GMAKE= yes +CONFIGURE_ARGS+= --prefix=${PREFIX} --enable-lfs --enable-syslog post-extract: ${CP} ${FILESDIR}/nbd.h ${WRKSRC} diff --git a/net/nbd-server/distinfo b/net/nbd-server/distinfo index fe5cea8e0cf1..c716afee57ae 100644 --- a/net/nbd-server/distinfo +++ b/net/nbd-server/distinfo @@ -1,2 +1,2 @@ -MD5 (nbd-2.6.0.tar.gz) = 97ee3120f321628b86f5c0fe77f89255 -SIZE (nbd-2.6.0.tar.gz) = 88774 +MD5 (nbd-2.7.1.tar.gz) = 54bc2b6069e752f89974ec46f96ff547 +SIZE (nbd-2.7.1.tar.gz) = 124724 diff --git a/net/nbd-server/files/nbd.h b/net/nbd-server/files/nbd.h index bf276f36d2c6..dcb0228efcae 100644 --- a/net/nbd-server/files/nbd.h +++ b/net/nbd-server/files/nbd.h @@ -5,6 +5,9 @@ * 2001 Copyright (C) Steven Whitehouse * New nbd_end_request() for compatibility with new linux block * layer code. + * 2003/06/24 Louis D. Langholtz <ldl@aros.net> + * Removed unneeded blksize_bits field from nbd_device struct. + * Cleanup PARANOIA usage & code. */ #ifndef LINUX_NBD_H @@ -20,58 +23,39 @@ #define NBD_SET_SIZE_BLOCKS _IO( 0xab, 7 ) #define NBD_DISCONNECT _IO( 0xab, 8 ) -#ifdef MAJOR_NR - -#include <linux/locks.h> -#include <asm/semaphore.h> - -#define LOCAL_END_REQUEST +enum { + NBD_CMD_READ = 0, + NBD_CMD_WRITE = 1, + NBD_CMD_DISC = 2 +}; -#include <linux/blk.h> +#define nbd_cmd(req) ((req)->cmd[0]) +#define MAX_NBD 128 -#ifdef PARANOIA -extern int requests_in; -extern int requests_out; -#endif +/* Define PARANOIA to include extra sanity checking code in here & driver */ +#define PARANOIA -static void -nbd_end_request(struct request *req) -{ - struct buffer_head *bh; - unsigned nsect; - unsigned long flags; - int uptodate = (req->errors == 0) ? 1 : 0; - -#ifdef PARANOIA - requests_out++; -#endif - spin_lock_irqsave(&io_request_lock, flags); - while((bh = req->bh) != NULL) { - nsect = bh->b_size >> 9; - blk_finished_io(nsect); - req->bh = bh->b_reqnext; - bh->b_reqnext = NULL; - bh->b_end_io(bh, uptodate); - } - blkdev_release_request(req); - spin_unlock_irqrestore(&io_request_lock, flags); -} - -#define MAX_NBD 128 +/* userspace doesn't need the nbd_device structure */ +#ifdef __KERNEL__ struct nbd_device { - int refcnt; int flags; int harderror; /* Code of hard error */ #define NBD_READ_ONLY 0x0001 #define NBD_WRITE_NOCHK 0x0002 struct socket * sock; - struct file * file; /* If == NULL, device is not ready, yet */ - int magic; /* FIXME: not if debugging is off */ + struct file * file; /* If == NULL, device is not ready, yet */ +#ifdef PARANOIA + int magic; /* FIXME: not if debugging is off */ +#endif spinlock_t queue_lock; - struct list_head queue_head; /* Requests are added here... */ + struct list_head queue_head;/* Requests are added here... */ struct semaphore tx_lock; + struct gendisk *disk; + int blksize; + u64 bytesize; }; + #endif /* This now IS in some kind of include file... */ diff --git a/net/nbd-server/files/patch-include b/net/nbd-server/files/patch-include deleted file mode 100644 index 90e84a80acc4..000000000000 --- a/net/nbd-server/files/patch-include +++ /dev/null @@ -1,11 +0,0 @@ -diff -urN nbd-2.6.orig/nbd-server.c nbd-2.6/nbd-server.c ---- nbd-2.6.orig/nbd-server.c Thu Oct 16 15:08:17 2003 -+++ nbd-server.c Sun Dec 14 23:48:10 2003 -@@ -53,6 +53,7 @@ - #include <sys/stat.h> - #include <sys/wait.h> /* wait */ - #include <sys/ioctl.h> -+#include <sys/param.h> - #include <sys/mount.h> /* For BLKGETSIZE */ - #include <signal.h> /* sigaction */ - #include <netinet/tcp.h> diff --git a/net/nbd-server/files/patch-mans b/net/nbd-server/files/patch-mans new file mode 100644 index 000000000000..22f982fd8d18 --- /dev/null +++ b/net/nbd-server/files/patch-mans @@ -0,0 +1,20 @@ +--- Makefile.in.orig Sat Jun 12 12:02:17 2004 ++++ Makefile.in Sat Jul 3 01:06:55 2004 +@@ -540,7 +540,7 @@ + exit 1; } >&2 + check-am: all-am + check: check-am +-all-am: Makefile $(PROGRAMS) $(MANS) config.h ++all-am: Makefile $(PROGRAMS) config.h + + installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(man8dir) +@@ -589,7 +589,7 @@ + + info-am: + +-install-data-am: install-man ++install-data-am: + + install-exec-am: install-binPROGRAMS install-sbinPROGRAMS + |