[Ocfs2-tools-commits] taoma commits r1355 - trunk/debugfs.ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Sun May 27 18:26:37 PDT 2007
Author: taoma
Date: 2007-05-27 18:26:35 -0700 (Sun, 27 May 2007)
New Revision: 1355
Modified:
trunk/debugfs.ocfs2/commands.c
Log:
Fix a bug in 'slotmap'.
The command 'slotmap' in debugfs.ocfs2 fails to check whether
the device is opened before using it and causes segment fault.
Thanks Haobo Zhou for finding this bug.
Signed-off-by: smushran
Modified: trunk/debugfs.ocfs2/commands.c
===================================================================
--- trunk/debugfs.ocfs2/commands.c 2007-05-17 00:49:41 UTC (rev 1354)
+++ trunk/debugfs.ocfs2/commands.c 2007-05-28 01:26:35 UTC (rev 1355)
@@ -1176,11 +1176,12 @@
FILE *out;
errcode_t ret;
char *buf = NULL;
- uint32_t len = gbls.fs->fs_blocksize;
+ uint32_t len;
if (check_device_open())
return ;
+ len = gbls.fs->fs_blocksize;
/* read in the first block of the slot_map file */
ret = read_whole_file(gbls.fs, gbls.slotmap_blkno, &buf, &len);
if (ret) {
More information about the Ocfs2-tools-commits
mailing list