1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

- Update to 2.7.1

PR:		ports/68575
Submitted by:	Wouter Verhelst <wouter@grep.be>
Modified by:	Christian Laursen <xi@borderworlds.dk> (maintainer)
This commit is contained in:
Pav Lucistnik 2004-07-02 23:21:53 +00:00
parent feab1d4f18
commit f0fb0ecbbe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=112817
5 changed files with 49 additions and 60 deletions

View File

@ -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}

View File

@ -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

View File

@ -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
#include <linux/blk.h>
#ifdef PARANOIA
extern int requests_in;
extern int requests_out;
#endif
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);
}
enum {
NBD_CMD_READ = 0,
NBD_CMD_WRITE = 1,
NBD_CMD_DISC = 2
};
#define nbd_cmd(req) ((req)->cmd[0])
#define MAX_NBD 128
/* Define PARANOIA to include extra sanity checking code in here & driver */
#define PARANOIA
/* 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... */

View File

@ -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>

View File

@ -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