1 --- ocfs2-tools-1.4.4/fsck.ocfs2/problem.c.orig 2008-12-03 19:38:21.000000000 +0100
2 +++ ocfs2-tools-1.4.4/fsck.ocfs2/problem.c 2015-12-13 18:22:46.957121947 +0100
4 ans = ost->ost_answer ? 'y' : 'n';
15 --- ocfs2-tools-1.4.4/tunefs.ocfs2/op_query.c.orig 2009-04-14 00:10:40.000000000 +0200
16 +++ ocfs2-tools-1.4.4/tunefs.ocfs2/op_query.c 2015-12-13 18:47:05.127060750 +0100
19 char label[OCFS2_MAX_VOL_LABEL_LEN + 1];
21 - snprintf(label, OCFS2_MAX_VOL_LABEL_LEN + 1,
22 + snprintf(label, OCFS2_MAX_VOL_LABEL_LEN + 1, "%s",
23 (char *)OCFS2_RAW_SB(query_fs->fs_super)->s_label);
25 return print_string(stream, info, args, label);
27 register_printf_function('O', handle_ro_compat, handle_arginfo);
30 - fprintf(stdout, fmt);
31 + fprintf(stdout, fmt, NULL /* hack */);
35 --- ocfs2-tools-1.4.4/debugfs.ocfs2/commands.c.orig 2010-03-17 01:10:43.000000000 +0100
36 +++ ocfs2-tools-1.4.4/debugfs.ocfs2/commands.c 2015-12-13 19:23:59.780301145 +0100
38 gbls.cwd = strdup("/");
40 /* lookup heartbeat file */
41 - snprintf (sysfile, sizeof(sysfile),
42 + snprintf (sysfile, sizeof(sysfile), "%s",
43 ocfs2_system_inodes[HEARTBEAT_SYSTEM_INODE].si_name);
44 ret = ocfs2_lookup(gbls.fs, gbls.sysdir_blkno, sysfile,
45 strlen(sysfile), NULL, &gbls.hb_blkno);
49 /* lookup slotmap file */
50 - snprintf (sysfile, sizeof(sysfile),
51 + snprintf (sysfile, sizeof(sysfile), "%s",
52 ocfs2_system_inodes[SLOT_MAP_SYSTEM_INODE].si_name);
53 ret = ocfs2_lookup(gbls.fs, gbls.sysdir_blkno, sysfile,
54 strlen(sysfile), NULL, &gbls.slotmap_blkno);
55 --- ocfs2-tools-1.4.4/debugfs.ocfs2/find_block_inode.c.orig 2010-03-11 20:29:36.000000000 +0100
56 +++ ocfs2-tools-1.4.4/debugfs.ocfs2/find_block_inode.c 2015-12-13 19:24:25.760300055 +0100
61 - snprintf(sysfile, sizeof(sysfile),
62 + snprintf(sysfile, sizeof(sysfile), "%s",
63 ocfs2_system_inodes[GLOBAL_BITMAP_SYSTEM_INODE].si_name);
65 ret = ocfs2_lookup(fs, fs->fs_sysdir_blkno, sysfile,
66 --- ocfs2-tools-1.4.4/mount.ocfs2/mount.ocfs2.c.orig 2015-12-13 17:42:28.663890097 +0100
67 +++ ocfs2-tools-1.4.4/mount.ocfs2/mount.ocfs2.c 2015-12-13 19:25:34.140297185 +0100
71 if (mo->type && strcmp(mo->type, OCFS2_FS_NAME)) {
72 - com_err(progname, OCFS2_ET_UNKNOWN_FILESYSTEM, mo->type);
73 + com_err(progname, OCFS2_ET_UNKNOWN_FILESYSTEM, "%s", mo->type);
77 --- ocfs2-tools-1.4.4/fswreck/chain.c.orig 2010-02-25 03:06:23.000000000 +0100
78 +++ ocfs2-tools-1.4.4/fswreck/chain.c 2015-12-13 19:28:24.540290032 +0100
80 struct ocfs2_super_block *sb = OCFS2_RAW_SB(fs->fs_super);
82 if (slotnum == UINT16_MAX)
83 - snprintf(sysfile, sizeof(sysfile),
84 + snprintf(sysfile, sizeof(sysfile), "%s",
85 ocfs2_system_inodes[GLOBAL_BITMAP_SYSTEM_INODE].si_name);
87 snprintf(sysfile, sizeof(sysfile),
90 struct ocfs2_super_block *sb = OCFS2_RAW_SB(fs->fs_super);
92 - snprintf(sysfile, sizeof(sysfile),
93 + snprintf(sysfile, sizeof(sysfile), "%s",
94 ocfs2_system_inodes[GLOBAL_BITMAP_SYSTEM_INODE].si_name);
96 ret = ocfs2_lookup(fs, sb->s_system_dir_blkno, sysfile,
97 --- ocfs2-tools-1.4.4/fswreck/group.c.orig 2010-02-25 03:06:24.000000000 +0100
98 +++ ocfs2-tools-1.4.4/fswreck/group.c 2015-12-13 19:29:30.580287261 +0100
100 struct ocfs2_super_block *sb = OCFS2_RAW_SB(fs->fs_super);
102 if (slotnum == UINT16_MAX)
103 - snprintf(sysfile, sizeof(sysfile),
104 + snprintf(sysfile, sizeof(sysfile), "%s",
105 ocfs2_system_inodes[GLOBAL_BITMAP_SYSTEM_INODE].si_name);
107 snprintf(sysfile, sizeof(sysfile),
108 --- ocfs2-tools-1.6.4/extras/check_metaecc.c.orig 2010-12-10 20:37:07.000000000 +0100
109 +++ ocfs2-tools-1.6.4/extras/check_metaecc.c 2015-12-20 22:26:27.487793994 +0100
111 if (crc == new_check.bc_crc32e) {
112 snprintf(outbuf + result_offset,
113 sizeof(outbuf) - result_offset, "PASS\n");
114 - fprintf(stderr, outbuf);
115 + fputs(outbuf, stderr);
119 @@ -176,13 +176,13 @@
120 if (crc == new_check.bc_crc32e) {
121 snprintf(outbuf + result_offset,
122 sizeof(outbuf) - result_offset, "ECC Fixup\n");
123 - fprintf(stderr, outbuf);
124 + fputs(outbuf, stderr);
128 snprintf(outbuf + result_offset,
129 sizeof(outbuf) - result_offset, "FAIL\n");
130 - fprintf(stderr, outbuf);
131 + fputs(outbuf, stderr);
133 offset = snprintf(outbuf, sizeof(outbuf), "Calculated");
134 while (offset < crc_offset)
136 snprintf(outbuf + crc_offset, sizeof(outbuf) - crc_offset,
137 "CRC32: %.8"PRIx32" ECC: %.4"PRIx16"\n",
139 - fprintf(stderr, outbuf);
140 + fputs(outbuf, stderr);
143 check.bc_crc32e = cpu_to_le32(new_check.bc_crc32e);