read-only: minor cleanup

Really use read-only flags for opening the file when asked for read-only

Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Naphtali Sprei 2010-03-14 15:19:57 +02:00 committed by Anthony Liguori
parent db1a49726c
commit 07108b29c5

View File

@ -258,6 +258,7 @@ int main(int argc, char **argv)
break;
case 'r':
readonly = true;
flags &= ~BDRV_O_RDWR;
break;
case 'P':
partition = strtol(optarg, &end, 0);