search for: tbuf

Displaying 19 results from an estimated 19 matches for "tbuf".

Did you mean: buf
2020 Apr 03
0
Patch to support Powercool PCRACK-1200VA
...guage IDs are 16 bit numbers, and they start at the third byte in the descriptor.               *   See USB 2.0 specification, section 9.6.7, for more information on this.               * This should allow automatic application of the workaround */ -            ret = usb_get_string(udev, 0, 0, tbuf, sizeof(tbuf)); + +            /* check for buflen fix */ +            blen = sizeof(tbuf); +            if ((buflen_fix != -1) && (buflen_fix < (int)sizeof(tbuf))) { +                blen = buflen_fix; +            } +            ret = usb_get_string(udev, 0, 0, tbuf, blen);           ...
2019 Sep 09
0
[PATCH] autoconf tweaks for C99 compilers
...KEN_READDIR=cross])]) if test x"$rsync_cv_HAVE_BROKEN_READDIR" = x"yes"; then @@ -833,14 +840,14 @@ fi AC_CACHE_CHECK([for utimbuf],rsync_cv_HAVE_STRUCT_UTIMBUF,[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> -#include <utime.h>]], [[struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));]])],[rsync_cv_HAVE_STRUCT_UTIMBUF=yes],[rsync_cv_HAVE_STRUCT_UTIMBUF=no])]) +#include <utime.h>]], [[struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; utime("foo.c",&tbuf);]])],[rsync_cv_HAVE_S...
2002 Sep 10
0
[PATCH] Add --preserve-atime switch to rsync
...! int set_modtime(char *fname, time_t modtime) { extern int dry_run; if (dry_run) --- 240,246 ---- ! int set_modtime(char *fname,time_t modtime, time_t acctime) { extern int dry_run; if (dry_run) *************** *** 255,271 **** { #ifdef HAVE_UTIMBUF struct utimbuf tbuf; ! tbuf.actime = time(NULL); tbuf.modtime = modtime; return utime(fname,&tbuf); #elif defined(HAVE_UTIME) time_t t[2]; ! t[0] = time(NULL); t[1] = modtime; return utime(fname,t); #else struct timeval t[2]; ! t[0].tv_sec = time(NULL); t[0].tv_usec = 0;...
2020 Apr 03
0
Powercool PCRACK-1200VA patch update
...third byte in the descriptor. +         * See USB 2.0 specification, section 9.6.7, for more information on this. +         * +         * The only reason to do this is to avoid usb_get_string_simple() which automatically +         * queries the langid with every request +         */ +        char tbuf[USB_BUFLEN_MAX]; +        int ret = usb_get_string(dev, 0, 0, tbuf, sizeof(tbuf)); +        if (ret >= 4) { +            langid_fix = tbuf[2] | (tbuf[3] << 8); +            upsdebugx(1, "First supported language ID: 0x%x (please report to the NUT maintainer!)", langid_fix); +   ...
2006 Sep 12
1
openssh (OpenBSD) , bsdauth and tis authsrv
nuqneH, I've tried using TIS authsrv authentication via bsd auth and found it quite limited. The most important restriction it does not log ip and fqdn of the remote peer, nor the application name, to the authentication server. It does not matter much for TIS authsrv, but since other applications do provide such information, our authsrv version uses it for extra authentication restrictions.
1996 Dec 23
2
Buffer overflow in Linux''s login program [Forwarded e-mail from Joe Zbiciak]
...user *provides* a login name with the "-f" flag, no such check is made. I can successfully get a segv with my binary with just over 1064 characters pushed into - -f''s argument. Here''s a short diff which patches the problem: 401c401,402 < (void)strcpy(tbuf, username); - --- > (void)strncpy(tbuf, username, sizeof(tbuf)-2); > tbuf[sizeof(tbuf)-1]=0; Interim fix: remove SUID bit on /bin/login: chmod a-s /bin/login Long-term fix: download util-linux-2.6, and apply the above patch. Basically, by removing the SUID bi...
2004 Apr 10
0
patches for copying atimes
...rintf(FINFO, + "set modtime, atime of %s to (%ld) %s, (%ld) %s\n", fname, (long) modtime, - asctime(localtime(&modtime))); + mtimebuf, + (long) atime, atimebuf); } { #ifdef HAVE_UTIMBUF struct utimbuf tbuf; - tbuf.actime = time(NULL); + tbuf.actime = atime; tbuf.modtime = modtime; return utime(fname,&tbuf); #elif defined(HAVE_UTIME) time_t t[2]; - t[0] = time(NULL); + t[0] = atime; t[1] = modtime; return utime(fname,t); #else struct timeval t[2]; - t[0].tv_sec = time(NULL...
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
...000000 +0100 @@ -128,7 +128,7 @@ -int set_modtime(char *fname, time_t modtime) +int set_modtime(char *fname, time_t modtime, time_t acctime) { if (verbose > 2) { rprintf(FINFO, "set modtime of %s to (%ld) %s", @@ -142,17 +142,17 @@ { #ifdef HAVE_UTIMBUF struct utimbuf tbuf; - tbuf.actime = time(NULL); + tbuf.actime = acctime; tbuf.modtime = modtime; return utime(fname,&tbuf); #elif defined HAVE_UTIME time_t t[2]; - t[0] = time(NULL); + t[0] = acctime; t[1] = modtime; return utime(fname,t); #else struct timeval t[2]; - t[0].tv_sec = time(N...
2019 Nov 12
0
[PATCH v3 06/14] RDMA/hfi1: Use mmu_interval_notifier_insert for user_exp_rcv
...xp_rcv.c b/drivers/infiniband/hw/hfi1/user_exp_rcv.c index 3592a9ec155e85..75a378162162d3 100644 --- a/drivers/infiniband/hw/hfi1/user_exp_rcv.c +++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.c @@ -59,11 +59,11 @@ static int set_rcvarray_entry(struct hfi1_filedata *fd, struct tid_user_buf *tbuf, u32 rcventry, struct tid_group *grp, u16 pageidx, unsigned int npages); -static int tid_rb_insert(void *arg, struct mmu_rb_node *node); static void cacheless_tid_rb_remove(struct hfi1_filedata *fdata, struct tid_rb_node *tnode); -static void tid_rb_remove(void *arg, s...
2004 Apr 20
1
improved atime patch
...rintf(FINFO, + "set modtime, atime of %s to (%ld) %s, (%ld) %s\n", fname, (long) modtime, - asctime(localtime(&modtime))); + mtimebuf, + (long) atime, atimebuf); } { #ifdef HAVE_UTIMBUF struct utimbuf tbuf; - tbuf.actime = time(NULL); + tbuf.actime = atime; tbuf.modtime = modtime; return utime(fname,&tbuf); #elif defined(HAVE_UTIME) time_t t[2]; - t[0] = time(NULL); + t[0] = atime; t[1] = modtime; return utime(fname,t); #else struct timeval t[2]; - t[0].tv_sec = time(NULL...
2019 Oct 28
1
[PATCH v2 06/15] RDMA/hfi1: Use mmu_range_notifier_inset for user_exp_rcv
...xp_rcv.c b/drivers/infiniband/hw/hfi1/user_exp_rcv.c index 3592a9ec155e85..a1ab3bd334f89e 100644 --- a/drivers/infiniband/hw/hfi1/user_exp_rcv.c +++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.c @@ -59,11 +59,11 @@ static int set_rcvarray_entry(struct hfi1_filedata *fd, struct tid_user_buf *tbuf, u32 rcventry, struct tid_group *grp, u16 pageidx, unsigned int npages); -static int tid_rb_insert(void *arg, struct mmu_rb_node *node); static void cacheless_tid_rb_remove(struct hfi1_filedata *fdata, struct tid_rb_node *tnode); -static void tid_rb_remove(void *arg, s...
2012 Mar 26
2
[PATCH DOCDAY] docs: wrap misc/xen-command-line.markdown to 80 columns
...lse` -Flag to force synchronous console output. Useful for debugging, but not suitable for production environments due to incurred overhead. +Flag to force synchronous console output. Useful for debugging, but +not suitable for production environments due to incurred overhead. ### tboot ### tbuf\_size @@ -395,17 +467,25 @@ Specify the per-cpu trace buffer size in ### vga > `= ( ask | current | text-80x<rows> | gfx-<width>x<height>x<depth> | mode-<mode> )[,keep]` -`ask` causes Xen to display a menu of available modes and request the user to choose one of...
2010 Aug 09
8
Call for testing: OpenSSH-5.6
Hi, OpenSSH 5.6 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. This is a moderately large release, with a number of new features and bug fixes. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is available in CVS HEAD: http://www.openbsd.org/anoncvs.html Portable OpenSSH
2019 Nov 12
20
[PATCH hmm v3 00/14] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com> 8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1, scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where they only use invalidate_range_start/end and immediately check the invalidating range against some driver data structure to tell if the driver is interested. Half of them use an interval_tree, the others
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...sizeof dir, SOCKET_DIR, (uintmax_t) euid); r = mkdir (dir, 0700); - if (r == -1 && errno != EEXIST) { + if (r == -1 && errno != EEXIST) error: - perror (dir); - exit (EXIT_FAILURE); - } + error (EXIT_FAILURE, errno, "%s", dir); if (lstat (dir, &statbuf) == -1) goto error; if (!S_ISDIR (statbuf.st_mode) || @@ -99,10 +98,8 @@ receive_stdout (int s) if (NULL == cmptr) { cmptr = malloc (controllen); - if (NULL == cmptr) { - perror ("malloc"); - exit (EXIT_FAILURE); - } + if (NULL == cmptr) + error (...
2019 Oct 28
32
[PATCH v2 00/15] Consolidate the mmu notifier interval_tree and locking
From: Jason Gunthorpe <jgg at mellanox.com> 8 of the mmu_notifier using drivers (i915_gem, radeon_mn, umem_odp, hfi1, scif_dma, vhost, gntdev, hmm) drivers are using a common pattern where they only use invalidate_range_start/end and immediately check the invalidating range against some driver data structure to tell if the driver is interested. Half of them use an interval_tree, the others
2012 Jun 24
0
nouveau _BIOS method
......`KILL..p..HST 6290: 53 75 61 a0 0f 94 87 6a 61 70 83 88 6a 61 00 48 Sua....jap..ja.H 62a0: 42 44 52 a0 12 43 4f 4d 50 7d 48 53 54 53 0a ff BDR..COMP}HSTS.. 62b0: 48 53 54 53 a4 01 a4 00 14 40 0d 53 42 4c 52 0b HSTS..... at .SBLR. 62c0: 08 54 42 55 46 11 04 0b 00 01 a0 07 53 54 52 54 .TBUF.......STRT 62d0: a4 00 70 6a 49 32 43 45 70 0a bf 48 53 54 53 70 ..pjI2CEp..HSTSp 62e0: 7d 68 01 00 54 58 53 41 70 69 48 43 4f 4d 70 0a }h..TXSApiHCOMp. 62f0: 54 48 43 4f 4e 70 0b a0 0f 60 a2 12 90 92 7b 48 THCONp...`....{H 6300: 53 54 53 0a 80 00 60 76 60 5b 21 0a 32 a0 09 92 STS...`v`...
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I have a new problem: Register RBP is used in a function foo. (I am not allocating RBP to any virtual register, the instances of RBP in function foo are in the machine code when my register allocator starts.) Function foo calls function bar. Register RBP is not saved across the call, though it is live after the call. Function bar includes a virtual register. The code that I'm using to
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ame; __gconv_fct __fct; __gconv_btowc_fct __btowc_fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct...