}
static int verify_vc_device(int fd) {
+ assert(fd >= 0);
+
unsigned char data[] = {
TIOCL_GETFGCONSOLE,
};
}
static int verify_vc_allocation_byfd(int fd) {
- struct vt_stat vcs = {};
+ assert(fd >= 0);
+ struct vt_stat vcs = {};
if (ioctl(fd, VT_GETSTATE, &vcs) < 0)
return -errno;
struct unimapdesc unimapd;
_cleanup_free_ struct unipair* unipairs = NULL;
_cleanup_free_ void *fontbuf = NULL;
- int log_level = LOG_WARNING;
- int r;
+ int log_level = LOG_WARNING, r;
+
+ assert(src_fd >= 0);
unipairs = new(struct unipair, USHRT_MAX);
if (!unipairs)
char *path;
int r;
+ assert(ret_path);
+
fd = open_terminal(src_vc, O_RDWR|O_CLOEXEC|O_NOCTTY);
if (fd < 0)
return log_error_errno(fd, "Failed to open %s: %m", src_vc);