summaryrefslogtreecommitdiff
path: root/cgpt/cgpt_find.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgpt/cgpt_find.c')
-rw-r--r--cgpt/cgpt_find.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgpt/cgpt_find.c b/cgpt/cgpt_find.c
index 20070209..345c8310 100644
--- a/cgpt/cgpt_find.c
+++ b/cgpt/cgpt_find.c
@@ -94,7 +94,7 @@ static int do_search(CgptFindParams *params, char *fileName) {
GptEntry *entry;
char partlabel[GPT_PARTNAME_LEN];
- if (CGPT_OK != DriveOpen(fileName, &drive))
+ if (CGPT_OK != DriveOpen(fileName, &drive, O_RDONLY))
return 0;
if (GPT_SUCCESS != GptSanityCheck(&drive.gpt)) {