diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-09-01 12:59:15 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-09-01 13:00:25 +0100 |
commit | 73be6db9bf1c0ae96262a5f4fa9328bb4e648637 (patch) | |
tree | ae700be562eb48e1a85ec937e2d92aa88852b4fa | |
parent | 5b012024c49672cc69635ff01f9b9e4f87de1c65 (diff) | |
download | libguestfs-73be6db9bf1c0ae96262a5f4fa9328bb4e648637.tar.gz libguestfs-73be6db9bf1c0ae96262a5f4fa9328bb4e648637.tar.xz libguestfs-73be6db9bf1c0ae96262a5f4fa9328bb4e648637.zip |
daemon: Factor out name of virtio serial channel.
This is just code motion.
-rw-r--r-- | daemon/guestfsd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index eb1e82b4..51bb0b73 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -111,6 +111,9 @@ int autosync_umount = 1; /* Not used explicitly, but required by the gnulib 'error' module. */ const char *program_name = "guestfsd"; +/* Name of the virtio-serial channel. */ +#define VIRTIO_SERIAL_CHANNEL "/dev/virtio-ports/org.libguestfs.channel.0" + static void usage (void) { @@ -237,8 +240,7 @@ main (int argc, char *argv[]) #endif /* Connect to virtio-serial channel. */ - int sock = open ("/dev/virtio-ports/org.libguestfs.channel.0", - O_RDWR | O_CLOEXEC); + int sock = open (VIRTIO_SERIAL_CHANNEL, O_RDWR | O_CLOEXEC); if (sock == -1) { fprintf (stderr, "\n" @@ -253,7 +255,7 @@ main (int argc, char *argv[]) "output to the libguestfs developers, either in a bug report\n" "or on the libguestfs redhat com mailing list.\n" "\n"); - perror ("/dev/virtio-ports/org.libguestfs.channel.0"); + perror (VIRTIO_SERIAL_CHANNEL); exit (EXIT_FAILURE); } |