Displaying 20 results from an estimated 158 matches for "f_type".
Did you mean:
d_type
2017 Oct 11
1
[PATCH] common/mlutils: fix f_type comparisons
statfs::f_type is usually a signed type, so cast it to unsigned to check
its value against magic values of filesystems.
---
common/mlutils/unix_utils-c.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/mlutils/unix_utils-c.c b/common/mlutils/unix_utils-c.c
index f8c4f8abe..2afdc9...
2017 Oct 04
2
Re: [PATCH v2 2/2] builder: Choose better weights in the planner.
...value
> +guestfs_int_mllib_statvfs_filesystem_is_remote (value pathv)
> +{
> +#ifdef HAVE_STATFS
> + struct statfs buf;
> +
> + if (statfs (String_val (pathv), &buf) == -1)
> + unix_error (errno, (char *) "statvfs", pathv);
> +
> + return Val_bool (buf.f_type == 0xff534d42 /* CIFS_MAGIC_NUMBER */ ||
> + buf.f_type == 0x6969 /* NFS_SUPER_MAGIC */ ||
> + buf.f_type == 0x517b /* SMB_SUPER_MAGIC */);
Using linux/magic.h + the constants from it should avoid the hardcoded
numbers, and possibly allow more remote files...
2008 Oct 26
3
Undefined method f_title
Hi,
This is my migration:
class CreateSampleForms < ActiveRecord::Migration
def self.add_data
SampleForm.create(:name => ''Default (Empty)'', :f_type => ''Default
(Empty)'', :description => ''Use this template to create a blank form.'')
end
def self.up
create_table :sample_forms do |t|
t.string :name, :null => false
t.string :f_title
t.text :description
t.timestamps
e...
2011 Mar 17
1
generalized mixed linear models, glmmPQL and GLMER give very different results that both do not fit the data well...
...hink it makes sense, but I'm not sure.
Here are the observed cell means:
conflict noconflict
control 0.6896552 0.9568966
high 0.6935484 0.9677419
low 0.8846154 0.9903846
GLMER gives me:
summary(glmer(accuracy~f_power*f_type + (1|subject), family=binomial,data=syllogisms))
Generalized linear mixed model fit by the Laplace approximation
Formula: accuracy ~ f_power * f_type + (1 | subject)
Data: syllogisms
AIC BIC logLik deviance
406 437.7 -196 392
Random effects:
Groups Name Variance Std.Dev.
subjec...
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 04
0
Re: [PATCH v2 2/2] builder: Choose better weights in the planner.
On Wed, Oct 04, 2017 at 03:20:53PM +0200, Pino Toscano wrote:
> > + return Val_bool (buf.f_type == 0xff534d42 /* CIFS_MAGIC_NUMBER */ ||
> > + buf.f_type == 0x6969 /* NFS_SUPER_MAGIC */ ||
> > + buf.f_type == 0x517b /* SMB_SUPER_MAGIC */);
>
> Using linux/magic.h + the constants from it should avoid the hardcoded
> numbers, and possibl...
2005 Dec 17
2
[patch] fix defintion of struct statfs64
...4.
Signed-off-by: maximilian attems <janitor@sternwelten.at>
Signed-off-by: Frederik Sch?ler <fschueler-guest@costa.debian.org>
--- klibc-1.1.1.orig/include/sys/vfs.h
+++ klibc-1.1.1/include/sys/vfs.h
@@ -32,17 +32,17 @@
#else /* _BITSIZE == 64 */
struct statfs {
- uint64_t f_type;
- uint64_t f_bsize;
+ uint32_t f_type;
+ uint32_t f_bsize;
uint64_t f_blocks;
uint64_t f_bfree;
uint64_t f_bavail;
uint64_t f_files;
uint64_t f_ffree;
__kernel_fsid_t f_fsid;
- uint64_t f_namelen;
- uint64_t f...
2006 Mar 03
7
Meta Programming Help
I have the following two methods:
def ProductFile::find_images(mode, prod_id)
# convert to symbol in case it is not (most commonly it may be a String)
mode = mode.to_sym
case mode
when :all, :first
ProductFile::find(mode, :conditions => ["product_id = ? AND
file_type LIKE ?", prod_id, "image%"])
end
end
def ProductFile::find_documents(mode,
2007 May 05
2
Tru64 patch for mountpoint.c
I believe that there is one more patch required for a successful build
on Tru64:
# diff ./src/lib/mountpoint.c.orig ./src/lib/mountpoint.c
60a61,63
> #ifdef __osf__
> point_r->type = p_strdup(pool, getvfsbynumber(buf.f_type));
> #else
62c65,66
< point_r->block_size = buf.f_bsize;
---
> #endif
> point_r->block_size = buf.f_bsize;
Cheers
--
Simon L Jackson
Carringbush.Net
+-
Carringbush.Net
Hosting * Development * Advice
Web: www.carringbush.net <http://www.carringbush.ne...
2017 Oct 03
0
[PATCH v2 2/2] builder: Choose better weights in the planner.
...NB: This is a "noalloc" call. */
+value
+guestfs_int_mllib_statvfs_filesystem_is_remote (value pathv)
+{
+#ifdef HAVE_STATFS
+ struct statfs buf;
+
+ if (statfs (String_val (pathv), &buf) == -1)
+ unix_error (errno, (char *) "statvfs", pathv);
+
+ return Val_bool (buf.f_type == 0xff534d42 /* CIFS_MAGIC_NUMBER */ ||
+ buf.f_type == 0x6969 /* NFS_SUPER_MAGIC */ ||
+ buf.f_type == 0x517b /* SMB_SUPER_MAGIC */);
+#else
+ return Val_bool (0);
+#endif
+}
diff --git a/common/mlutils/unix_utils.ml b/common/mlutils/unix_utils.ml
index 085eff...
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.
- Reji...
2013 Dec 16
1
External pointers and changing SEXPTYPE
...unction and another one that uses the
pointer.
sample R code:
# initializing
a <- init_my_ptr(fname)
# reading more data: error!
df <- read_my_data(a)
data structure in C:
typedef struct {
SEXP ans, ans_nms, R_z, R_a, R_b, R_c;
FTYPE *datafile;
char *fname;
float *a, *b, *c;
int f_type;
float t, p, l;
int st, na, result, bFlags;
XXX z;
} my_data_ptr;
// In a C function initializing the external pointer:
my_data_ptr *mydata = Calloc( 1, my_data_ptr ) ;
SEXP Rdata;
PROTECT(Rdata = R_MakeExternalPtr( mydata, R_fname, R_NilValue ));
...
mydata->a = Calloc(mydata->na, flo...
2019 Apr 24
2
Re: [PATCH nbdkit v5 FINAL 15/19] file: Implement extents.
On 3/28/19 11:18 AM, Richard W.M. Jones wrote:
> This uses lseek SEEK_DATA/SEEK_HOLE to search for allocated data and
> holes in the underlying file.
> ---
> plugins/file/file.c | 141 ++++++++++++++++++++++++++++++++++---
> tests/Makefile.am | 5 ++
> tests/test-file-extents.sh | 57 +++++++++++++++
> 3 files changed, 193 insertions(+), 10 deletions(-)
2019 May 05
3
Staged installation fail on some file systems
...2bc1c5d0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fde2bc13820, [],
SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fde2bc1c5d0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096,
f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0,
0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096,
f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_f...
2019 May 07
2
Staged installation fail on some file systems
...RT_1, {0x7fde2bc13820, [],
> > SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fde2bc1c5d0}, NULL, 8) = 0
> > rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
> > getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
> > statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096,
> > f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0,
> > 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
> > statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096,
> > f_blocks=0, f_bfree=...
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...e %s\n", program, devname);
return devname;
}
-
+
atexit(device_cleanup); /* unlink the device node on exit */
devname = devname_buf;
}
@@ -1330,10 +1365,15 @@ static int open_device(const char *path, struct stat *st, const char **_devname)
fs_type = NTFS;
else if (sfs.f_type == XFS_SUPER_MAGIC)
fs_type = XFS;
+ else if (sfs.f_type == UFS1_SUPER_MAGIC)
+ fs_type = UFS1;
+ else if (sfs.f_type == UFS2_SUPER_MAGIC)
+ fs_type = UFS2;
if (!fs_type) {
fprintf(stderr,
- "%s: not a fat, ntfs, ext2/3/4, btrfs or xfs filesystem: %s\n",
+ "%s: not...
2006 Feb 19
2
[patch] statfs64 sparc64 fix
...standards -
one for 32 and one for 64 bits, and they're incompatible... */
-#if !defined(__x86_64__) && !defined(__ia64__) && !defined(__sparc64__)
+#if !defined(__x86_64__) && !defined(__ia64__) && !defined(__arch64__)
struct statfs {
uint32_t f_type;
2006 Apr 04
0
[patch] statfs64 sparc_v9 fix
...tandards -
one for 32 and one for 64 bits, and they're incompatible... */
-#if !defined(__x86_64__) && !defined(__ia64__) && !defined(__sparc64__)
+#if !defined(__x86_64__) && !defined(__ia64__) && !defined(__sparc_v9__)
struct statfs {
uint32_t f_type;
2006 Aug 08
1
[patch] mips fix statfs
please pull from git://charm.itp.tuwien.ac.at/mattems/klibc/.git
branch maks.
arch/mips/klibc/archconfig.h | 3 +++
klibc/sysconfig.h | 10 ++++++++++
sys/vfs.h | 17 +++++++++++++++++
3 files changed, 30 insertions(+)
2019 Apr 25
0
Re: [PATCH nbdkit v5 FINAL 15/19] file: Implement extents.
...t that there's another case we don't
cover: what if we're using tmpfs where SEEK_HOLE is supported but has
poor performance? I would say the best solution is to fix tmpfs! But
if that's not possible, perhaps we can do {f,}statfs(2) on the file
and blacklist certain combinations of f_type and kernel version?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html