From fa198ffb04d179ff6ba1f35a17c1338f9ab23010 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Wed, 18 Mar 2009 01:39:17 -0300
Subject: [PATCH 07/32] samples/full.c: Bring it up to date with API changes

This patch fixes two small API-related issues in samples/full.c: the
introduction of the jdir parameter (in this case, NULL), and the fact that
we assume read-only mode unless O_RDWR is specified.

Thanks to Chris Riddoch for the bug report.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 samples/full.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/samples/full.c b/samples/full.c
index 90a009e..83e069c 100644
--- a/samples/full.c
+++ b/samples/full.c
@@ -17,11 +17,11 @@ int main(void)
 	struct jfsck_result result;
 
 	/* check the file is OK */
-	jfsck(FILENAME, &result);
-	jfsck_cleanup(FILENAME);
+	jfsck(FILENAME, NULL, &result);
+	jfsck_cleanup(FILENAME, NULL);
 
 	/* and open it */
-	r = jopen(&file, FILENAME, O_SYNC | O_CREAT | O_TRUNC, 0600, 0);
+	r = jopen(&file, FILENAME, O_RDWR | O_CREAT | O_TRUNC, 0600, 0);
 	if (r < 0) {
 		perror("jopen");
 		return 1;
-- 
1.6.2.rc0.226.gf08f


