search for: f_flag

Displaying 20 results from an estimated 174 matches for "f_flag".

Did you mean: f_flags
2010 Feb 03
0
[PATCH] ocfs2: Add parenthesis to wrap the check for O_DIRECT.
...insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 06ccf6a..b2ca980 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2013,8 +2013,8 @@ out_dio: /* buffered aio wouldn't have proper lock coverage today */ BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT)); - if ((file->f_flags & O_DSYNC && !direct_io) || IS_SYNC(inode) || - (file->f_flags & O_DIRECT && has_refcount)) { + if (((file->f_flags & O_DSYNC) && !direct_io) || IS_SYNC(inode) || + ((file->f_flags & O_DIRECT) &amp...
2018 Jan 04
2
virtdf outputs on host differs from df in guest
...          188376       0    188376   0% /run/user/0 using scripts: python -c 'import os; s = os.statvfs ("/"); print s' posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=5886149, f_bfree=4802342, f_bavail=4802342, f_files=23556096, f_ffree=23435372, f_favail=23435372, f_flag=4096, f_namemax=255) python -c 'import os; s = os.statvfs ("/boot"); print s' posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=127147, f_bfree=93815, f_bavail=93815, f_files=512000, f_ffree=511626, f_favail=511626, f_flag=4096, f_namemax=255) and then on host using v...
2017 Oct 03
0
[PATCH v2 1/2] daemon: Reimplement statvfs API in OCaml.
...lue pathv) +guestfs_int_mllib_statvfs_statvfs (value pathv) { CAMLparam1 (pathv); - CAMLlocal1 (rv); + int64_t f_bsize; + int64_t f_frsize; + int64_t f_blocks; + int64_t f_bfree; + int64_t f_bavail; + int64_t f_files; + int64_t f_ffree; + int64_t f_favail; + int64_t f_fsid; + int64_t f_flag; + int64_t f_namemax; + CAMLlocal2 (rv, v); + +#ifdef HAVE_STATVFS struct statvfs buf; - int64_t free_space; - if (statvfs (String_val (pathv), &buf) == -1) { - perror ("statvfs"); - caml_failwith ("statvfs"); - } + if (statvfs (String_val (pathv), &buf)...
1998 Mar 12
2
FreeBSD Security Advisory: FreeBSD-SA-98:02.mmap
...ory protections are * compatible. Note that we only worry about * writability if mapping is shared; in this case, @@ -265,12 +286,20 @@ maxprot |= VM_PROT_READ; else if (prot & PROT_READ) return (EACCES); - if (flags & MAP_SHARED) { - if (fp->f_flag & FWRITE) - maxprot |= VM_PROT_WRITE; - else if (prot & PROT_WRITE) - return (EACCES); - } else + /* + * If we are sharing potential changes (either via + * MAP_SHARED or via the implicit sharing of character + * device mappings), and we are trying to...
2016 Jan 06
0
[klibc:master] readlink: Add -f option
...ink.c +++ b/usr/utils/readlink.c @@ -7,24 +7,45 @@ const char *progname; static __noreturn usage(void) { - fprintf(stderr, "Usage: %s link...\n", progname); + fprintf(stderr, "Usage: %s [-f] link...\n", progname); exit(1); } int main(int argc, char *argv[]) { + int c, f_flag = 0; const char *name; char link_name[PATH_MAX]; int rv; int i; - progname = *argv++; + progname = argv[0]; - if (argc < 2) + do { + c = getopt(argc, argv, "f"); + if (c == EOF) + break; + switch (c) { + case 'f': + f_flag = 1; + break; + + case '?...
2014 Sep 27
1
[PATCH 2/2] readlink: Add -f option
...ink.c +++ b/usr/utils/readlink.c @@ -7,24 +7,45 @@ const char *progname; static __noreturn usage(void) { - fprintf(stderr, "Usage: %s link...\n", progname); + fprintf(stderr, "Usage: %s [-f] link...\n", progname); exit(1); } int main(int argc, char *argv[]) { + int c, f_flag = 0; const char *name; char link_name[PATH_MAX]; int rv; int i; - progname = *argv++; + progname = argv[0]; - if (argc < 2) + do { + c = getopt(argc, argv, "f"); + if (c == EOF) + break; + switch (c) { + case 'f': + f_flag = 1; + break; + + case '?...
2013 Jun 06
1
Reproducable Infiniband panic
Hello, I see a reproducable panic when doing ibping and aborting it with ^C. My setup is two machines with Mellanox Infinihost III HCAs (one Linux one FreeBSD) connected back-to-back. Details below. I can upload 2 crash dumps, if this is useful. For some reason the port doesn't become ACTIVE, so no packets arrive, but that is probably unrelated. % uname -a FreeBSD cosel.inf.tu-dresden.de
2017 Oct 02
3
[PATCH 0/2] builder: Choose better weights in the planner.
It started out as "this'll be just a simple fix ..." and turned into something a bit over-engineered in the end. Here it is anyway. Rich.
2017 Oct 03
4
[PATCH v2 0/2] builder: Choose better weights in the planner.
v1 -> v2: - Removed the f_type field from StatVFS.statvfs structure. - New function StatVFS.filesystem_is_remote, written in C. [Thinking about it, this should probably be called ?is_network_filesystem?, but I can change that before pushing]. - Use statvfs instead of fstatvfs, and statfs instead of fstatfs. - Rejigged the comments in builder/builder.ml to make them simpler
2017 Oct 04
2
[PATCH v3 0/2] builder: Choose better weights in the planner.
v2 -> v3: - Drop gnulib fallback.
2001 Sep 19
2
Coda and Ext3
Hi everyone, The Linux Coda drivers and the ext3 patches don't seem to get along very well, at least in Linux 2.4.7. I've got a stock 2.4.7 kernel with a patch applied to the USB drivers (for a sony digital camera; see http://www.sujal.net/tech/linux/ just a change in unusual_devs.h). After I applied the ext3 patches from http://www.uow.edu.au/~andrewm/linux/ext3/ . Basically,
2018 Jan 04
2
Re: virtdf outputs on host differs from df in guest
...00, Chen Fan wrote: >[In guest] >> python -c 'import os; s = os.statvfs ("/"); print s' >> posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=5886149, >> f_bfree=4802342, f_bavail=4802342, f_files=23556096, >> f_ffree=23435372, f_favail=23435372, f_flag=4096, f_namemax=255) >> >> python -c 'import os; s = os.statvfs ("/boot"); print s' >> posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=127147, >> f_bfree=93815, f_bavail=93815, f_files=512000, f_ffree=511626, >> f_favail=511626, f_flag=409...
2016 Jan 31
4
configure warning on SunOS 4.1.4
Hi, I was told to do so by configure of openssh-7.1p2 -:) ... configure: WARNING: sys/audit.h: present but cannot be compiled configure: WARNING: sys/audit.h: check for missing prerequisite headers? configure: WARNING: sys/audit.h: see the Autoconf documentation configure: WARNING: sys/audit.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/audit.h:
2016 Jan 06
3
[PATCH klibc 0/3] Changes to support initramfs-tools 0.117
initramfs-tools version 0.117 requires 'readlink -f' and 'mount -o defaults' to work. The first two patches were previously submitted but not applied. Ben. Ben Hutchings (3): Implement realpath() readlink: Add -f option mount: Implement -o defaults usr/include/stdlib.h | 2 ++ usr/klibc/Kbuild | 2 +- usr/klibc/realpath.c | 49
2018 Jan 04
0
Re: virtdf outputs on host differs from df in guest
...18 at 12:58:40PM +0800, Chen Fan wrote: [In guest] > python -c 'import os; s = os.statvfs ("/"); print s' > posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=5886149, > f_bfree=4802342, f_bavail=4802342, f_files=23556096, > f_ffree=23435372, f_favail=23435372, f_flag=4096, f_namemax=255) > > python -c 'import os; s = os.statvfs ("/boot"); print s' > posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=127147, > f_bfree=93815, f_bavail=93815, f_files=512000, f_ffree=511626, > f_favail=511626, f_flag=4096, f_namemax=255) [...
2006 Aug 17
0
[RFC] proposed extensions for SFTP
...ng revision 1.70 diff -u -r1.70 sftp-server.c --- sftp-server.c 3 Aug 2006 03:34:42 -0000 1.70 +++ sftp-server.c 17 Aug 2006 22:43:04 -0000 @@ -462,6 +463,35 @@ buffer_free(&msg); } +static void +send_statvfs(u_int32_t id, struct statvfs *st) +{ + Buffer msg; + int flag = 0; + + if (st->f_flag & ST_RDONLY) + flag |= SSH2_FX_ST_RDONLY; + if (st->f_flag & ST_NOSUID) + flag |= SSH2_FX_ST_NOSUID; + + buffer_init(&msg); + buffer_put_char(&msg, SSH2_FXP_EXTENDED_REPLY); + buffer_put_int(&msg, id); + buffer_put_int(&msg, st->f_bsize); + buffer_put_int(&msg, s...
2014 Dec 08
0
[PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.
..., (void *)buffer, size, wait); @@ -160,13 +166,14 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf, goto out_unlock; } + mutex_lock(&reading_mutex); if (!data_avail) { bytes_read = rng_get_data(current_rng, rng_buffer, rng_buffer_size(), !(filp->f_flags & O_NONBLOCK)); if (bytes_read < 0) { err = bytes_read; - goto out_unlock; + goto out_unlock_reading; } data_avail = bytes_read; } @@ -174,7 +181,7 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf, if (!data_avail) { if (filp->f_flags &a...
2016 Dec 30
0
[PATCH net-next V3 3/3] tun: rx batching
...; + local_bh_enable(); + } else { + tun_rx_batched(tfile, skb, more); + } #else netif_rx_ni(skb); #endif @@ -1312,7 +1348,8 @@ static ssize_t tun_chr_write_iter(struct kiocb *iocb, struct iov_iter *from) if (!tun) return -EBADFD; - result = tun_get_user(tun, tfile, NULL, from, file->f_flags & O_NONBLOCK); + result = tun_get_user(tun, tfile, NULL, from, + file->f_flags & O_NONBLOCK, false); tun_put(tun); return result; @@ -1570,7 +1607,8 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) return -EBADFD; ret = tun_get_user...
2016 Dec 28
0
[PATCH net-next V2 3/3] tun: rx batching
...ets++; + stats->rx_bytes += len; + } u64_stats_update_end(&stats->syncp); put_cpu_ptr(stats); @@ -1312,7 +1360,8 @@ static ssize_t tun_chr_write_iter(struct kiocb *iocb, struct iov_iter *from) if (!tun) return -EBADFD; - result = tun_get_user(tun, tfile, NULL, from, file->f_flags & O_NONBLOCK); + result = tun_get_user(tun, tfile, NULL, from, + file->f_flags & O_NONBLOCK, false); tun_put(tun); return result; @@ -1570,7 +1619,8 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) return -EBADFD; ret = tun_get_user...
2017 Jan 18
0
[PATCH net-next V5 3/3] tun: rx batching
...ive_skb(skb); - local_bh_enable(); + tun_rx_batched(tun, tfile, skb, more); #else netif_rx_ni(skb); #endif @@ -1311,7 +1347,8 @@ static ssize_t tun_chr_write_iter(struct kiocb *iocb, struct iov_iter *from) if (!tun) return -EBADFD; - result = tun_get_user(tun, tfile, NULL, from, file->f_flags & O_NONBLOCK); + result = tun_get_user(tun, tfile, NULL, from, + file->f_flags & O_NONBLOCK, false); tun_put(tun); return result; @@ -1569,7 +1606,8 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) return -EBADFD; ret = tun_get_user...