search for: check_for_modul

Displaying 5 results from an estimated 5 matches for "check_for_modul".

Did you mean: check_for_modules
2011 Aug 04
0
[PATCH] fstype: fix possible null deref in check_for_modules()
Make check_for_modules() more readable, just allways call continue on NULL return. That way the possible null dereference in strlen is no longer possible. This doesn't yet make it unsuck, but is a small step. Seen fixed too in blkid there with patch adding ko.gz support. Cc: Karel Zak <kzak at redhat.com> S...
2008 Oct 11
1
[PATCH] fstype: Fix ext4/ext4dev probing
...39;)) != NULL) + *t = 0; + if ((t = strchr(cp, ' ')) != NULL) + *t = 0; + if (!strcmp(fs_name, cp)) { + fclose(f); + return (1); + } + } + fclose(f); + return (0); +} + +/* + * Check to see if a filesystem is available as a module + * Returns 1 if found, 0 if not + */ +static int check_for_modules(const char *fs_name) +{ + struct utsname uts; + FILE *f; + char buf[1024], *cp, *t; + int i; + + if (uname(&uts)) + return (0); + snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release); + + f = fopen(buf, "r"); + if (!f) + return (0); + while (fgets(bu...
2019 Oct 07
0
[klibc:master] fstype: Drop obsolete support for "ext4dev"
...if (t != NULL) - *t = 0; - t = strchr(cp, ' '); - if (t != NULL) - *t = 0; - if (!strcmp(fs_name, cp)) { - fclose(f); - return 1; - } - } - fclose(f); - return 0; -} - -/* - * Check to see if a filesystem is available as a module - * Returns 1 if found, 0 if not - */ -static int check_for_modules(const char *fs_name) -{ - struct utsname uts; - FILE *f; - char buf[1024], *cp, *t; - int i; - - if (uname(&uts)) - return 0; - snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release); - - f = fopen(buf, "r"); - if (!f) - return 0; - while (fgets(buf, s...
2011 Jul 05
6
[PATCH 1/7] ln: Check snprintf() return values
Add some semi-useful error message, as printing the failing dir or file seems not really advisable after that error. Signed-off-by: maximilian attems <max at stro.at> --- usr/utils/ln.c | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/usr/utils/ln.c b/usr/utils/ln.c index e826eb8..257b33f 100644 --- a/usr/utils/ln.c +++ b/usr/utils/ln.c @@ -9,7
2011 Jul 08
4
[PATCH 0/4] usr/kinit checkpatch
Various coding style fixes checkpatch warns about. The goal is not to be 100% checkpatch compliant, but to have more consistent coding style. As this is a trivial patch serie, will land in 24 hours in klibc git, unless of course ml review hits a bugger. Checked with size(3) that the generated kinit, fstype, ipconfig and nfsmount are the same. maximilian attems (4): [klibc] ipconfig: reduce