search for: grab_file

Displaying 4 results from an estimated 4 matches for "grab_file".

2004 Oct 19
1
include insmod in klibc?
...r) { case ENOEXEC: return "Invalid module format"; case ENOENT: return "Unknown symbol in module"; case ESRCH: return "Module has wrong symbol version"; case EINVAL: return "Invalid parameters"; default: return strerror(err); } } static void *grab_file(const char *filename, unsigned long *size) { unsigned int max = 16384; int ret, fd; void *buffer = malloc(max); if (streq(filename, "-")) fd = dup(STDIN_FILENO); else fd = open(filename, O_RDONLY, 0); if (fd < 0) return NULL; *size = 0; while ((ret = read(fd, buffer +...
2006 Apr 12
9
Showing Images from a file store
Hi all. I am wrting a small content management tool for my company and was trying to display some images from our file store shown below. <td> <img src="\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"/> The app was displaying the image when it is under the \public\images directory. Is there anything special we need to do to get a file from outside the root of the application? Any help
2007 Dec 10
1
[git patch] m-i-t support, ipconfig fix
...OEXEC: - return "Invalid module format"; - case ENOENT: - return "Unknown symbol in module"; - case ESRCH: - return "Module has wrong symbol version"; - case EINVAL: - return "Invalid parameters"; - default: - return strerror(err); - } -} - -static void *grab_file(const char *filename, unsigned long *size) -{ - unsigned int max = 16384; - int ret, fd; - void *buffer = malloc(max); - - if (streq(filename, "-")) - fd = dup(STDIN_FILENO); - else - fd = open(filename, O_RDONLY, 0); - - if (fd < 0) - return NULL; - - *size = 0; - while ((ret = rea...
2007 Sep 22
3
[git patch] module-init-tools fixes
...OEXEC: - return "Invalid module format"; - case ENOENT: - return "Unknown symbol in module"; - case ESRCH: - return "Module has wrong symbol version"; - case EINVAL: - return "Invalid parameters"; - default: - return strerror(err); - } -} - -static void *grab_file(const char *filename, unsigned long *size) -{ - unsigned int max = 16384; - int ret, fd; - void *buffer = malloc(max); - - if (streq(filename, "-")) - fd = dup(STDIN_FILENO); - else - fd = open(filename, O_RDONLY, 0); - - if (fd < 0) - return NULL; - - *size = 0; - while ((ret = rea...