All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/gfs2/edit gfs2hex.c hexedit.c
@ 2006-06-12 20:43 rpeterso
  0 siblings, 0 replies; 2+ messages in thread
From: rpeterso @ 2006-06-12 20:43 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rpeterso at sourceware.org	2006-06-12 20:43:33

Modified files:
	gfs2/edit      : gfs2hex.c hexedit.c 

Log message:
	Fixed a bug when printing stuffed directories.  For example,
	gfs2_edit -p masterdir was not working properly.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/gfs2hex.c.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- cluster/gfs2/edit/gfs2hex.c	2006/06/06 14:35:32	1.2
+++ cluster/gfs2/edit/gfs2hex.c	2006/06/12 20:43:33	1.3
@@ -220,12 +220,11 @@
 			 !(di->di_flags & GFS2_DIF_EXHASH)) {
 		int skip = 0;
 		/* Directory Entries: */
-		indirect[indirect_blocks].dirents = 0;
+		indirect[0].dirents = 0;
 		for (x = sizeof(struct gfs2_dinode); x < bufsize; x += skip) {
-			skip = indirect_dirent(&indirect[indirect_blocks], buf + x, 0);
+			skip = indirect_dirent(&indirect[0], buf + x, indirect[0].dirents);
 			if (skip <= 0)
 				break;
-			indirect_blocks++;
 		}
 	}
 	else if (isdir &&
--- cluster/gfs2/edit/hexedit.c	2006/06/06 14:35:32	1.3
+++ cluster/gfs2/edit/hexedit.c	2006/06/12 20:43:33	1.4
@@ -669,7 +669,11 @@
 					total_dirents++;
 					if (indirect[e].dirents > 1) {
 						eol(5);
-						print_gfs2("%d. (%d). 0x%llx: ", total_dirents, d + 1,
+						print_gfs2("%d. (%d). %lld (0x%llx) / %lld (0x%llx): ",
+								   total_dirents, d + 1,
+								   indirect[e].dirent[d].dirent.de_inum.no_formal_ino,
+								   indirect[e].dirent[d].dirent.de_inum.no_formal_ino,
+								   indirect[e].dirent[d].block,
 								   indirect[e].dirent[d].block);
 					}
 					switch(indirect[e].dirent[d].dirent.de_type) {



^ permalink raw reply	[flat|nested] 2+ messages in thread
* [Cluster-devel] cluster/gfs2/edit gfs2hex.c hexedit.c
@ 2006-08-09 20:22 rpeterso
  0 siblings, 0 replies; 2+ messages in thread
From: rpeterso @ 2006-08-09 20:22 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rpeterso at sourceware.org	2006-08-09 20:21:59

Modified files:
	gfs2/edit      : gfs2hex.c hexedit.c 

Log message:
	Hex values were not shown or printed correctly on x86_64.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/gfs2hex.c.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.c.diff?cvsroot=cluster&r1=1.5&r2=1.6

--- cluster/gfs2/edit/gfs2hex.c	2006/06/19 20:49:25	1.4
+++ cluster/gfs2/edit/gfs2hex.c	2006/08/09 20:21:59	1.5
@@ -114,6 +114,8 @@
 
 		if (fmt2) {
 			decimalsize = strlen(tmp_string);
+			va_end(args);
+			va_start(args, fmt2);
 			vsprintf(tmp_string, fmt2, args);
 			if (termlines) {
 				move(line, 50);
--- cluster/gfs2/edit/hexedit.c	2006/06/19 20:49:25	1.5
+++ cluster/gfs2/edit/hexedit.c	2006/08/09 20:21:59	1.6
@@ -945,7 +945,7 @@
 		else if (string[0] == '0' && string[1] == 'x')
 			sscanf(string, "%"SCNx64, &temp_blk); /* retrieve in hex */
 		else
-			sscanf(string, "%lld", &temp_blk); /* retrieve decimal */
+			sscanf(string, "%" PRIu64, &temp_blk); /* retrieve decimal */
 
 		if (temp_blk < max_block) {
 			offset = 0;



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-09 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-12 20:43 [Cluster-devel] cluster/gfs2/edit gfs2hex.c hexedit.c rpeterso
  -- strict thread matches above, loose matches on Subject: below --
2006-08-09 20:22 rpeterso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.