Displaying 2 results from an estimated 2 matches for "have_uu_lock".
Did you mean:
have_munlock
2011 Jun 28
0
[nut-commits] svn commit r3081 - branches/apcsmart-dev/drivers
Citeren Michal Soltys <msoltyspl-guest at alioth.debian.org>:
> @@ -251,14 +251,14 @@
> if (do_lock_port) {
> errno = 0;
> ret = 0;
> -#ifdef HAVE_UU_LOCK
> + #ifdef HAVE_UU_LOCK
> ret = uu_lock(xbasename(device_path));
> -#elif defined(HAVE_FLOCK)
> + #elif defined(HAVE_FLOCK)
> ret = flock(fd, LOCK_EX | LOCK_NB);
> -#elif defined(HAVE_LOCKF)
> + #elif defined(HAVE_LOCKF)
> lseek(fd, 0L, SEEK_SET);
> ret = l...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...000000 -0500
+++ ./drivers/serial.c 2009-08-13 17:47:37.000000000 -0400
@@ -27,6 +27,9 @@
#include <ctype.h>
#include <sys/file.h>
#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
#include <unistd.h>
#ifdef HAVE_UU_LOCK
@@ -132,8 +135,37 @@
int ser_open(const char *port)
{
int fd;
+ char *path =0;
+ char *p =0;
- fd = open(port, O_RDWR | O_NOCTTY | O_EXCL | O_NONBLOCK);
+ path = alloca(strlen(port) + 1);
+ if (path != 0) {
+ strcpy(path,port);
+ p = strchr(path,':');
+ }
+ if (p != 0 && p !...