search for: pfd

Displaying 20 results from an estimated 60 matches for "pfd".

Did you mean: fd
2015 Apr 13
3
[Compile Issue] netcat.c on HP NonStop
Greetings, I am porting the openssh-portable 6.8 release to the HP NonStop (NSE) platform. Prior versions were no real problem, with minor tweeks. However, with the inclusion of regress/netcat.c, which depends on arpa/telnet.h, we have an issue. Unfortunately, the platform does not have this file, nor anything like it - telnet is done rather differently. We do have a version of netcat (0.7.1
2014 Dec 09
2
[PATCH] check for default subvolid and act accordingly on install
...me> --- extlinux/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extlinux/main.c b/extlinux/main.c index 09740bd..c3d9612 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -1261,6 +1261,9 @@ static const char *find_device_btrfs(const char *path) if (!validate_device_btrfs(pfd, dfd)) rv = (const char *)devinfo.path; /* It's good! */ + /* check for default subvolume and act accordingly */ + get_default_subvol("/", subvol); + err: if (pfd >= 0) close(pfd); -- 2.1.3 -Beaver
2018 Dec 09
2
[PATCH] Enable ConnectTimeout with ConnectionAttempts
...ugzilla.mindrot.org/show_bug.cgi?id=2918 --- sshconnect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sshconnect.c b/sshconnect.c index 4862da5e..b837a83a 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -454,11 +454,12 @@ waitrfd(int fd, int *timeoutp) { struct pollfd pfd; struct timeval t_start; - int oerrno, r; + int oerrno, r, next_timeout; monotime_tv(&t_start); pfd.fd = fd; pfd.events = POLLIN; + next_timeout = *timeoutp; for (; *timeoutp >= 0;) { r = poll(&pfd, 1, *timeoutp); oerrno = errno; @@ -473,6 +474,7 @@ waitrfd(int fd, int...
2012 Apr 20
2
Posting list encoding improvements - pfd encoding & var len encoding comparison program
.... The search strategy of fixed length encoding is skipping with exponential step (1, 2, 4, 8, ...). Once exceeds the desired doc id, back to previous step and skip with step 1. 3. The implemented fixed length encoding uses 4 bytes as fixed length. This is not optimal and can be further optimized in PFD. 4. The program generates uniform random doc id gap and doc len to make posting list. *You can access the code via my github: https://github.com/zwxxx/pfd_simple_test* -- Weixian Zhou Department of Computer Science and Engineering University at Buffalo, SUNY -------------- next part -------------...
2011 Jun 02
2
preauth privsep logging via monitor
...;[preauth] %s", msg); + buffer_free(&logmsg); + xfree(msg); + return 0; +} + int monitor_read(struct monitor *pmonitor, struct mon_table *ent, struct mon_table **pent) @@ -472,6 +540,27 @@ monitor_read(struct monitor *pmonitor, s Buffer m; int ret; u_char type; + struct pollfd pfd[2]; + + for (;;) { + bzero(&pfd, sizeof(pfd)); + pfd[0].fd = pmonitor->m_sendfd; + pfd[0].events = POLLIN; + pfd[1].fd = pmonitor->m_log_recvfd; + pfd[1].events = pfd[1].fd == -1 ? 0 : POLLIN; + if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, -1) == -1) + fatal("%s: poll: %s", __...
2020 Aug 11
3
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
...non-blocking mode in a task, problem occurs if CONDITION is 1 */ > //#define CONDITION (getpid() % 2 != 0) > > static volatile sig_atomic_t stop; > static void handler(int sig __attribute__((unused))) { stop = 1; } > > static void loop(int fd, int sec) > { > struct pollfd pfd = { .fd = fd, .events = POLLIN, }; > unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0; > int size, rc, rd; > > srandom(getpid()); > if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1) > perror("fcntl"); > size = MINBU...
2020 Aug 11
3
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
...non-blocking mode in a task, problem occurs if CONDITION is 1 */ > //#define CONDITION (getpid() % 2 != 0) > > static volatile sig_atomic_t stop; > static void handler(int sig __attribute__((unused))) { stop = 1; } > > static void loop(int fd, int sec) > { > struct pollfd pfd = { .fd = fd, .events = POLLIN, }; > unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0; > int size, rc, rd; > > srandom(getpid()); > if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1) > perror("fcntl"); > size = MINBU...
2015 Feb 26
4
Call for testing: OpenSSH 6.8
...MSGHDR)) + struct msghdr msg; +#ifndef HAVE_ACCRIGHTS_IN_MSGHDR union { struct cmsghdr hdr; char buf[CMSG_SPACE(sizeof(int))]; } cmsgbuf; struct cmsghdr *cmsg; - struct iovec iov; - char c = '\0'; - ssize_t r; +#endif + struct iovec vec; + char ch = '\0'; struct pollfd pfd; + ssize_t r; - /* Avoid obvious stupidity */ - if (isatty(STDOUT_FILENO)) - errx(1, "Cannot pass file descriptor to tty"); - - bzero(&mh, sizeof(mh)); - bzero(&cmsgbuf, sizeof(cmsgbuf)); - bzero(&iov, sizeof(iov)); - bzero(&pfd, sizeof(pfd)); - - mh.msg_control = (cadd...
2013 Feb 19
13
[PATCH] mini-os: implement poll(2)
...; #include <sys/types.h> #include <sys/unistd.h> @@ -678,6 +679,29 @@ static void dump_set(int nfds, fd_set *readfds, fd_set *writefds, fd_set *except #define dump_set(nfds, readfds, writefds, exceptfds, timeout) #endif +#ifdef LIBC_DEBUG +static void dump_pollfds(struct pollfd *pfd, int nfds, int timeout) +{ + int i, comma, fd; + + printk("["); + comma = 0; + for (i = 0; i < nfds; i++) { + fd = pfd[i].fd; + if (comma) + printk(", "); + printk("%d(%c)/%02x", fd, file_types[files[fd].type], +...
2015 Feb 25
2
Call for testing: OpenSSH 6.8
On 24/02/15 21:56, Tim Rice wrote: > On Wed, 25 Feb 2015, Damien Miller wrote: > > | On Tue, 24 Feb 2015, Tom G. Christensen wrote: > | > | > I've switched to HEAD in the git repo and it now builds on Solaris > | > 2.6, 7, 8 and 9 but the testsuite still cannot be built due to the > | > missing <err.h>. > > The err.h issue is fixes but there still
2015 Apr 04
0
[PATCH] check for default subvolid and act accordingly on install
...; 1 file changed, 3 insertions(+) > > diff --git a/extlinux/main.c b/extlinux/main.c > index 09740bd..c3d9612 100644 > --- a/extlinux/main.c > +++ b/extlinux/main.c > @@ -1261,6 +1261,9 @@ static const char *find_device_btrfs(const char *path) > if (!validate_device_btrfs(pfd, dfd)) > rv = (const char *)devinfo.path; /* It's good! */ > > + /* check for default subvolume and act accordingly */ > + get_default_subvol("/", subvol); > + > err: > if (pfd >= 0) > close(pfd); > -- Jordan, the indent...
1997 Nov 07
0
Fatal bug in 2.2.5R's lpd
...vs/src/usr.sbin/lpr/lpd/printjob.c,v retrieving revision 1.11.2.3 retrieving revision 1.11.2.4 diff -u -u -r1.11.2.3 -r1.11.2.4 --- printjob.c 1997/10/15 09:56:00 1.11.2.3 +++ printjob.c 1997/11/07 13:20:37 1.11.2.4 @@ -1474,6 +1474,7 @@ savealrm = signal(SIGALRM, alarmhandler); alarm(CT); pfd = getport(cp, port); + alarm(0); (void)signal(SIGALRM, savealrm); if (pfd < 0 && errno == ECONNREFUSED) resp = 1; @@ -1541,6 +1542,7 @@ savealrm = signal(SIGALRM, alarmhandler); alarm(CT); pfd = getport(RM, 0); + alarm(0); (void)signal(SIGALRM, savealrm); if (p...
2012 Dec 21
0
File Attachments for previous bug report
...ash_len); xfree(expected_confirm_hash); debug3("%s: success = %d", __func__, success); return success; -------------- next part -------------- --- monitor.c.orig 2012-12-19 17:22:45.966559767 -0800 +++ monitor.c 2012-12-19 17:26:41.827534855 -0800 @@ -547,7 +547,7 @@ struct pollfd pfd[2]; for (;;) { - bzero(&pfd, sizeof(pfd)); + memset(&pfd, 0, sizeof(pfd)); pfd[0].fd = pmonitor->m_sendfd; pfd[0].events = POLLIN; pfd[1].fd = pmonitor->m_log_recvfd; @@ -2137,8 +2137,8 @@ debug3("%s: sending step1", __func__); mm_request_send...
2014 Jul 28
4
[Bug 2260] New: monitor_fdpass.c fails to compile on QNX 6.3.2
..." -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c monitor_fdpass.c monitor_fdpass.c: In function `mm_send_fd': monitor_fdpass.c:61: storage size of `pfd' isn't known monitor_fdpass.c:70: warning: comparison between signed and unsigned monitor_fdpass.c:83: `POLLOUT' undeclared (first use in this function) monitor_fdpass.c:83: (Each undeclared identifier is reported only once monitor_fdpass.c:83: for each function it appears in.) monitor_...
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
...non-blocking mode in a task, problem occurs if CONDITION is 1 */ > //#define CONDITION (getpid() % 2 != 0) > > static volatile sig_atomic_t stop; > static void handler(int sig __attribute__((unused))) { stop = 1; } > > static void loop(int fd, int sec) > { > struct pollfd pfd = { .fd = fd, .events = POLLIN, }; > unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0; > int size, rc, rd; > > srandom(getpid()); > if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1) > perror("fcntl"); > size = MINBU...
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
...roblem occurs if CONDITION is 1 */ >> //#define CONDITION (getpid() % 2 != 0) >> >> static volatile sig_atomic_t stop; >> static void handler(int sig __attribute__((unused))) { stop = 1; } >> >> static void loop(int fd, int sec) >> { >> struct pollfd pfd = { .fd = fd, .events = POLLIN, }; >> unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0; >> int size, rc, rd; >> >> srandom(getpid()); >> if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1) >> perror("fcntl&quo...
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...s_type == BTRFS) + else if (fs_type == BTRFS || fs_type == UFS2) return btrfs_install_file(path, devfd, rst); else if (fs_type == XFS) return xfs_install_file(path, devfd, rst); @@ -983,7 +1003,7 @@ static int validate_device(const char *path, int devfd) struct statfs sfs; int pfd; int rv = -1; - + pfd = open(path, O_RDONLY|O_DIRECTORY); if (pfd < 0) goto err; @@ -1063,6 +1083,17 @@ static const char *find_device(const char *mtab_file, dev_t dev) done = true; break; } + + break; + case UFS1: + case UFS2: + if (!strcmp(mnt->mnt_t...
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...le or " + "`modprobe loop'.)", progname); + else + error("%s: could not find any free loop device", progname); + return 0; +} + +/* + * A function to read the passphrase either from the terminal or from + * an open file descriptor. + */ +static char * xgetpass(int pfd, const char *prompt) +{ + char *pass; + int buflen, i; + + pass = NULL; + buflen = 0; + for (i=0; ; i++) { + if (i >= buflen-1) { + /* we're running out of space in the buffer. + * Make it bigger: */ + char *tmppass = pass; + buflen += 128; + pass = realloc(tmppass, buflen); +...
2013 Jul 19
0
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...(fs_type == BTRFS || fs_type == UFS2) > return btrfs_install_file(path, devfd, rst); > else if (fs_type == XFS) > return xfs_install_file(path, devfd, rst); > @@ -983,7 +1003,7 @@ static int validate_device(const char *path, int devfd) > struct statfs sfs; > int pfd; > int rv = -1; > - > + > pfd = open(path, O_RDONLY|O_DIRECTORY); > if (pfd < 0) > goto err; > @@ -1063,6 +1083,17 @@ static const char *find_device(const char *mtab_file, dev_t dev) > done = true; > break; > } > + > + brea...
2020 Aug 31
0
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
...% 2 != 0) >>>> >>>> static volatile sig_atomic_t stop; >>>> static void handler(int sig __attribute__((unused))) { stop = 1; >>>> } >>>> >>>> static void loop(int fd, int sec) >>>> { >>>> struct pollfd pfd = { .fd = fd, .events = POLLIN, }; >>>> unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0; >>>> int size, rc, rd; >>>> >>>> srandom(getpid()); >>>> if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | >>>...