uname(&kernel);
util_strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL);
- f = fopen(modules, "r");
+ f = fopen(modules, "re");
if (f == NULL)
return;
char buf[4096];
long int memsize = -1;
- f = fopen("/proc/meminfo", "r");
+ f = fopen("/proc/meminfo", "re");
if (f == NULL)
return -1;
if (access(filename, F_OK) < 0)
return 0;
- f = fopen("/dev/kmsg", "w");
+ f = fopen("/dev/kmsg", "we");
if (f != NULL) {
fprintf(f, "<30>systemd-udevd[%u]: converting old udev database\n", getpid());
fclose(f);
sd_notify(1, "READY=1");
}
- f = fopen("/dev/kmsg", "w");
+ f = fopen("/dev/kmsg", "we");
if (f != NULL) {
fprintf(f, "<30>systemd-udevd[%u]: starting version " VERSION "\n", getpid());
fclose(f);