* src/virsh.c: The prompt should depend on readonly status,
not on the UID.
+Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
+
+ * src/virsh.c: The prompt should depend on readonly status,
+ not on the UID.
+
Thu Dec 6 16:30:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, qemud/Makefile.am: Added a --without-libvirtd
}
vshReadlineInit();
do {
+ const char *prompt = ctl->readonly ? VSH_PROMPT_RO : VSH_PROMPT_RW;
ctl->cmdstr =
- vshReadline(ctl, ctl->uid == 0 ? VSH_PROMPT_RW : VSH_PROMPT_RO);
+ vshReadline(ctl, prompt);
if (ctl->cmdstr == NULL)
break; /* EOF */
if (*ctl->cmdstr) {