search for: suspend_fil

Displaying 1 result from an estimated 1 matches for "suspend_fil".

Did you mean: suspend_file
2010 Nov 25
4
[PATCH]improve suspend_evtchn lock processing
..." +#include #define SUSPEND_LOCK_FILE "/var/lib/xen/suspend_evtchn" +/* cleanup obsolete suspend lock file which is unlinked for any reason, +so that current process can get lock */ +static void clean_obsolete_lock(int domid) +{ + int fd, pid, n; + char buf[128]; + char suspend_file[256]; + + snprintf(suspend_file, sizeof(suspend_file), "%s_%d_lock.d", + SUSPEND_LOCK_FILE, domid); + fd = open(suspend_file, O_RDWR); + + if (fd < 0) + return; + + n = read(fd, buf, 127); + + close(fd); + + if (n > 0) + { + sscanf(buf, &qu...