git » libjio » commit 68f1897

I wrote "COMMITED" and it's "COMMITTED". I need more english-based users =)

author Alberto Bertogli
2004-08-30 15:00:56 UTC
committer Alberto Bertogli
2007-07-15 13:17:52 UTC
parent dc48e03648086e3d3985c8347f6cbcb6665b7c84

I wrote "COMMITED" and it's "COMMITTED". I need more english-based users =)

I wrote "COMMITED" and it's "COMMITTED". I need more english-based users =)

Fix it now while we can (they have to recompile due to the flag changes, so
it shouldn't hurt _that_ much).

libjio.h +1 -1
trans.c +5 -5

diff --git a/libjio.h b/libjio.h
index ace331d..0fe82c8 100644
--- a/libjio.h
+++ b/libjio.h
@@ -136,7 +136,7 @@ FILE *jfsopen(struct jfs *stream, const char *mode);
 #define J_NOLOCK	1	/* don't lock the file before operating on it */
 #define J_NOROLLBACK	2	/* no need to read rollback information */
 #define J_LINGER	4	/* use lingering transactions */
-#define J_COMMITED	8	/* mark a transaction as commited */
+#define J_COMMITTED	8	/* mark a transaction as committed */
 #define J_ROLLBACKED	16	/* mark a transaction as rollbacked */
 #define J_ROLLBACKING	32	/* mark a transaction as rollbacking */
 
diff --git a/trans.c b/trans.c
index 0954b73..1c4806c 100644
--- a/trans.c
+++ b/trans.c
@@ -195,7 +195,7 @@ ssize_t jtrans_commit(struct jtrans *ts)
 	pthread_mutex_lock(&(ts->lock));
 
 	/* clear the flags */
-	ts->flags = ts->flags & ~J_COMMITED;
+	ts->flags = ts->flags & ~J_COMMITTED;
 	ts->flags = ts->flags & ~J_ROLLBACKED;
 
 	name = (char *) malloc(PATH_MAX);
@@ -380,7 +380,7 @@ ssize_t jtrans_commit(struct jtrans *ts)
 	}
 
 	/* mark the transaction as commited, _after_ it was removed */
-	ts->flags = ts->flags | J_COMMITED;
+	ts->flags = ts->flags | J_COMMITTED;
 
 
 rollback_exit:
@@ -395,7 +395,7 @@ rollback_exit:
 	 * Transactions that were successfuly recovered by rollbacking them
 	 * will have J_ROLLBACKED in their flags, so the caller can verify if
 	 * the failure was recovered or not. */
-	if (!(ts->flags & J_COMMITED) && !(ts->flags & J_ROLLBACKING)) {
+	if (!(ts->flags & J_COMMITTED) && !(ts->flags & J_ROLLBACKING)) {
 		rv = ts->flags;
 		ts->flags = ts->flags | J_NOLOCK | J_ROLLBACKING;
 		if (jtrans_rollback(ts) >= 0) {
@@ -406,7 +406,7 @@ rollback_exit:
 	}
 
 unlink_exit:
-	if (!(ts->flags & J_COMMITED)) {
+	if (!(ts->flags & J_COMMITTED)) {
 		unlink(name);
 		free_tid(ts->fs, ts->id);
 	}
@@ -421,7 +421,7 @@ exit:
 	pthread_mutex_unlock(&(ts->lock));
 
 	/* return the length only if it was properly commited */
-	if (ts->flags & J_COMMITED)
+	if (ts->flags & J_COMMITTED)
 		return written;
 	else
 		return -1;