search for: fatal_with_errno

Displaying 13 results from an estimated 13 matches for "fatal_with_errno".

2007 Jan 06
3
Re: [nut-commits] svn commit r708 - in trunk: . clients server
...(u_int32_t)0xffff0000) && > +#else > + (ip6->s6_addr32[2] == (u_int32_t)0x0000ffff) && > +#endif > + (ip6->s6_addr32[1] == 0) && (ip6->s6_addr32[0] == 0)) > + return(1); > + else > + return(0); > + } > + default: > + fatal_with_errno("mask_cmp: Unknown address family"); > + return(0); > + } > +} > > /* see if <addr> matches the acl <aclname> */ > -int acl_check(const char *aclname, const struct sockaddr_in *addr) > +int acl_check(const char *aclname, const struct sockaddr_storage *...
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...0) > + if ((host = gethostbyname(serv->addr)) == (struct hostent *)NULL) { > + struct in_addr listenaddr; > + > + if (!inet_aton(serv->addr, &listenaddr) || ((host = gethostbyaddr(&listenaddr, > + sizeof(listenaddr), AF_INET)) == (struct hostent *)NULL)) > + fatal_with_errno("gethost"); > + } > + > + if ((serv->sock_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) > fatal_with_errno("socket"); > > - res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (void *) &one, > + res = setsockopt(serv->sock_fd, SOL_SOCKET, SO...
2014 Dec 09
3
Tiny suggestion for upslog.c
...@ -76,6 +76,11 @@ exit_flag = sig; } +static void set_print_now_flag(int sig) +{ + /* no need to do anything, the signal will cause sleep to be interrupted */ +} + /* handlers: reload on HUP, exit on INT/QUIT/TERM */ static void setup_signals(void) { @@ -96,6 +101,11 @@ fatal_with_errno(EXIT_FAILURE, "Can't install SIGQUIT handler"); if (sigaction(SIGTERM, &sa, NULL) < 0) fatal_with_errno(EXIT_FAILURE, "Can't install SIGTERM handler"); + + sa.sa_handler = set_print_now_flag; + if (sigaction(SIGUSR1, &sa, NULL) < 0) +...
2007 Jan 06
1
Re: [nut-commits] svn commit r710 - in trunk: . clients server
...char *name) > @@ -150,6 +156,38 @@ > /* create a listening socket for tcp connections */ > static void setuptcp(void) > { > +#ifndef HAVE_IPV6 > + struct sockaddr_in server; > + int res, one = 1; > + > + if ((listenfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) > + fatal_with_errno("socket"); > + > + res = setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (void *) &one, > + sizeof(one)); > + > + if (res != 0) > + fatal_with_errno("setsockopt(SO_REUSEADDR)"); > + > + memset(&server, '\0', sizeof(server)); > + serve...
2010 Jan 16
1
ETIME on FreeBSD
...======================== > --- trunk/drivers/blazer_usb.c Wed Jan 13 00:48:53 2010 (r2242) > +++ trunk/drivers/blazer_usb.c Wed Jan 13 13:04:42 2010 (r2243) > @@ -358,27 +358,35 @@ > > switch (ret) > { > - case -EBUSY: > + case -EBUSY: /* Device or resource busy */ > fatal_with_errno(EXIT_FAILURE, "Got disconnected by another > driver"); > > - case -EPERM: > + case -EPERM: /* Operation not permitted */ > fatal_with_errno(EXIT_FAILURE, "Permissions problem"); > > - case -EPIPE: > - if (!usb_clear_halt(udev, 0x81)) { > + case -...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...: > upsdebugx(2, "Device does not match - skipping"); > goto next_device; > - } else if (ret==-1) { > - fatalx(EXIT_FAILURE, "matcher: %s", strerror(errno)); > - goto next_device; > - } else if (ret==-2) { > + case -1: > + fatal_with_errno(EXIT_FAILURE, "matcher"); > + default: > upsdebugx(2, "matcher: unspecified error"); > goto next_device; > } > + break; > } > - upsdebugx(2, "Device matches"); > > /* Now we have matched the device we wan...
2008 Nov 22
1
Improving messages related to USB permissions
Since the issue of USB permissions keeps coming up on the lists, I am wondering if there is something we can do to improve the messages printed at the default debug level when starting a USB driver. For instance, it shouldn't be too hard to mention which user was configured for non-privileged operations. A lot of people tend to assume that unless indicated otherwise, starting a program as
2013 Dec 17
0
kernel update to 3.12.5-1, now: upsd[617]: getaddrinfo: Servname not supported for ai_socktype
On Dec 16, 2013, at 10:11 PM, David C. Rankin wrote: > On 12/16/2013 08:01 PM, Charles Lepple wrote: >> On Dec 16, 2013, at 4:19 PM, David C. Rankin wrote: >> >>>> Dec 16 14:05:16 phoinix upsd[369]: getaddrinfo: Servname not supported for >>>> ai_socktype >> [...] >>>> The kernel update was from linux (3.12.1-3 -> 3.12.5-1), I don't
2007 Jan 08
2
Re: [nut-commits] svn commit r714 - in trunk: . server
...f) && > -#endif > - ((*(u_int32_t *)(&ip6->s6_addr[12]) & (u_int32_t)prefix) == net->s_addr)); > + return (IN6_IS_ADDR_V4MAPPED(ip6) && > + ((((const u_int32_t *)ip6)[3] & (u_int32_t)prefix) == net->s_addr)); > } > default: > fatal_with_errno("mask_cmp: Unknown address family"); > > _______________________________________________ > nut-commits mailing list > nut-commits@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-commits >
2013 Dec 17
2
kernel update to 3.12.5-1, now: upsd[617]: getaddrinfo: Servname not supported for ai_socktype
On 12/16/2013 08:01 PM, Charles Lepple wrote: > On Dec 16, 2013, at 4:19 PM, David C. Rankin wrote: > >> > Dec 16 14:05:16 phoinix upsd[369]: getaddrinfo: Servname not supported for >> > ai_socktype > [...] >> > The kernel update was from linux (3.12.1-3 -> 3.12.5-1), I don't see what >> > could have changed. How do I attempt to further
2013 Dec 17
4
kernel update to 3.12.5-1, now: upsd[617]: getaddrinfo: Servname not supported for ai_socktype
...ly : %d\n", hints.ai_family); fprintf(stderr, "hints.ai_socktype : %d\n", hints.ai_socktype); fprintf(stderr, "hints.ai_protocol : %d\n", hints.ai_protocol); if (v == EAI_SYSTEM) { fatal_with_errno(EXIT_FAILURE, "getaddrinfo"); } fatalx(EXIT_FAILURE, "getaddrinfo: %s", gai_strerror(v)); } I rebuilt nut and ran it, the error log contained: Dec 17 10:21:01 phoinix upsd[27151]: =========== Error Block Hit ============ Dec 17 10:21:01...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
..._SETFL,O_NONBLOCK)) { + close(fd); + fd = -1; + } + } + else + fd = open(port, O_RDWR | O_NOCTTY | O_EXCL | O_NONBLOCK); if (fd < 0) ser_open_error(port); @@ -147,6 +179,7 @@ { struct termios tio; + if (!isatty(fd)) return 0; if (tcgetattr(fd, &tio) != 0) fatal_with_errno("tcgetattr(%s)", port);
2008 Dec 24
1
Driver removal notification: al175
Hi Kirill, just to notify you that your al175 driver is being removed from the NUT tree, as of 2.4.0-pre1. if you wish to see it entering the tree again, please contact the Development mailing list to talk about it. Merry Christmas and happy New Year. Arnaud -- Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops Network UPS Tools (NUT) Project Leader -