X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-file.c;h=1df1d6d590f5bd1237cdde5d93bcb2895f01bd8e;hb=dc41a5e6b7601dcdf9eb2ac84dbf297cac037f5b;hp=96a247765c6fd65311ca786c22d44986c4491c32;hpb=71339a5a1f4efa93438ab9ab78e1317034b84da6;p=palacios.git diff --git a/linux_module/iface-file.c b/linux_module/iface-file.c index 96a2477..1df1d6d 100644 --- a/linux_module/iface-file.c +++ b/linux_module/iface-file.c @@ -128,7 +128,7 @@ static int palacios_file_mkdir(const char * pathname, unsigned short perms, int struct nameidata nd; // I'm not 100% sure about the version here, but it was around this time that the API changed -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37) ret = kern_path_parent(pathname, &nd); #else @@ -204,9 +204,12 @@ static void * palacios_file_open(const char * path, int mode, void * private_dat } + pfile->mode |= O_LARGEFILE; + + pfile->filp = filp_open(path, pfile->mode, 0); - if (pfile->filp == NULL) { + if (IS_ERR(pfile->filp)) { printk("Cannot open file: %s\n", path); return NULL; }