From: Richard W.M. Jones Date: Thu, 6 Dec 2007 16:36:21 +0000 (+0000) Subject: Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=efd495d6674a77117ddd3df95c27558cf4bfc22e;p=libvirt.git Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones * src/virsh.c: The prompt should depend on readonly status, not on the UID. --- diff --git a/ChangeLog b/ChangeLog index a512758e29..36cfa68b5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones + + * 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 * configure.in, qemud/Makefile.am: Added a --without-libvirtd diff --git a/src/virsh.c b/src/virsh.c index 3486d463b6..92fef77a5c 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -5054,8 +5054,9 @@ main(int argc, char **argv) } 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) {