Displaying 5 results from an estimated 5 matches for "fail_r".
Did you mean:
mail_r
2006 Jul 11
0
[rfc] standalone kinit/resume
...-1;
- dev_t resume_device;
- int len;
-
- resume_device = name_to_dev_t(resume_file);
-
- if (major(resume_device) == 0) {
- fprintf(stderr, "Invalid resume device: %s\n", resume_file);
- goto failure;
- }
-
- if ((powerfd = open("/sys/power/resume", O_WRONLY)) < 0)
- goto fail_r;
-
- len = snprintf(device_string, sizeof device_string, "%u:%u",
- major(resume_device), minor(resume_device));
-
- /* This should never happen */
- if (len >= sizeof device_string)
- goto fail_r;
-
- DEBUG(("kinit: trying to resume from %s\n", resume_file));
-
- if...
2019 Jan 20
0
[klibc:master] resume: Write resume_offset attribute
...64];
+ int attr_fd = -1;
+ char attr_value[64];
int len;
resume_device = name_to_dev_t(resume_file);
@@ -55,30 +55,50 @@ int resume(const char *resume_file, unsigned long long resume_offset)
goto failure;
}
- if ((powerfd = open("/sys/power/resume", O_WRONLY)) < 0)
- goto fail_r;
+ if ((attr_fd = open("/sys/power/resume_offset", O_WRONLY)) < 0)
+ goto fail_offset;
- len = snprintf(device_string, sizeof device_string,
- "%u:%u:%llu",
- major(resume_device), minor(resume_device),
+ len = snprintf(attr_value, sizeof attr_value,
+...
2018 Mar 30
0
[PATCH] resume: Use the kernel API from 4.17 for setting resume offset
...Write the offset, this won't work on less than 4.17 */
+ offsetfd = open("/sys/power/resume_offset", O_WRONLY);
+ if (offsetfd > 0) {
+ len = snprintf(offset_string, sizeof offset_string, "%llu",
+ resume_offset);
+ if (len >= sizeof offset_string)
+ goto fail_r;
+ if (write(offsetfd, offset_string, len) != len)
+ goto fail_r;
+ }
+
if ((powerfd = open("/sys/power/resume", O_WRONLY)) < 0)
goto fail_r;
len = snprintf(device_string, sizeof device_string,
- "%u:%u:%llu",
- major(resume_device), minor(resume_d...
2010 Apr 25
2
[git pull] small fixes, sh4, getruage() README's
...@@ int resume(const char *resume_file, unsigned long long resume_offset)
failure:
if (powerfd >= 0)
close(powerfd);
- fprintf(stderr, "kinit: No resume image, doing normal boot...\n");
+ dprintf(stderr, "kinit: No resume image, doing normal boot...\n");
return -1;
fail_r:
commit 8d38b56e6f2c9dac342df3de919775cc38eba603
Author: Thorsten Glaser <tg at mirbsd.de>
Date: Sat Mar 13 19:36:33 2010 +0100
[klibc] add getrusage()
we define rusage, but had no way to see this stats.
allows to compile mksh against klibc.
Signed-off-by: maximi...
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
...,7 +77,7 @@ int resume(const char *resume_file, unsigned long long resume_offset)
failure:
if (powerfd >= 0)
close(powerfd);
- fprintf(stderr, "kinit: No resume image, doing normal boot...\n");
+ dprintf("kinit: No resume image, doing normal boot...\n");
return -1;
fail_r:
commit fcceed7687bde392831c8eefa4c36600ce837fac
Author: Thorsten Glaser <tg at mirbsd.de>
Date: Sat Mar 13 19:36:33 2010 +0100
[klibc] add getrusage()
we define rusage, but had no way to see this stats.
it may allow compiling mksh against klibc.
Signed-off-by: m...