(Logical change 1.374)
This commit is contained in:
cantab.net!aia21 2004-04-16 20:54:34 +00:00
parent 16ca8d0253
commit 71c1fe3af8
8 changed files with 22 additions and 29 deletions

View File

@ -11,10 +11,12 @@ xx/xx/2004 - 1.9.2-WIP
$LogFile. (Szaka) $LogFile. (Szaka)
- Fix incorrect getopt_long() usage: converted argv[optind-1] to optarg - Fix incorrect getopt_long() usage: converted argv[optind-1] to optarg
so utilities won't do bogus and unexpected things. (Szaka) so utilities won't do bogus and unexpected things. (Szaka)
- Add new API security.[hc]::ntfs_sid_is_valid(), ntfs_sid_to_mbs(), and - Add new API security.[hc]::ntfs_sid_is_valid(), ntfs_sid_to_mbs(),
ntfs_sid_to_mbs_size(). and ntfs_sid_to_mbs_size().
- Big enhancement of ntfsinfo. (Yuval, me) - Big enhancement of ntfsinfo. (Yuval, me)
- Split mkntfs into multiple functions. (Yuval) - Split mkntfs into multiple functions. (Yuval)
- Compiler warning fixes in utilities related to GEN_PRINTF() and other
things. (Yuval)
05/04/2004 - 1.9.1 - Make mkntfs create bootable volumes and fixes/updates. 05/04/2004 - 1.9.1 - Make mkntfs create bootable volumes and fixes/updates.
- Update with SuSE 9.1 beta 1 versions of GNU build system. - Update with SuSE 9.1 beta 1 versions of GNU build system.

View File

@ -31,10 +31,6 @@
#include "cluster.h" #include "cluster.h"
#include "utils.h" #include "utils.h"
DEC_PRINTF (Eprintf)
DEC_PRINTF (Vprintf)
DEC_PRINTF (Qprintf)
#define RED "" #define RED ""
#define YELLOW "" #define YELLOW ""
#define GREEN "" #define GREEN ""

View File

@ -227,8 +227,7 @@ static void Dprintf(const char *fmt, ...)
/** /**
* Eprintf - error output; ignores quiet (-q) * Eprintf - error output; ignores quiet (-q)
*/ */
void Eprintf(const char *fmt, ...); int Eprintf(const char *fmt, ...)
void Eprintf(const char *fmt, ...)
{ {
va_list ap; va_list ap;
@ -236,6 +235,7 @@ void Eprintf(const char *fmt, ...)
va_start(ap, fmt); va_start(ap, fmt);
vfprintf(stderr, fmt, ap); vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
return 0;
} }
/* Generate code for Vprintf() function: Verbose output (-v). */ /* Generate code for Vprintf() function: Verbose output (-v). */

View File

@ -299,10 +299,12 @@ int main (int argc, char *argv[])
ntfs_inode_close (inode); ntfs_inode_close (inode);
ntfs_umount (vol, FALSE); ntfs_umount (vol, FALSE);
#if 0
if (result) if (result)
;//Printf ("failed\n"); Printf ("failed\n");
else else
;//Printf ("success\n"); Printf ("success\n");
#endif
return result; return result;
} }

View File

@ -119,17 +119,10 @@ int wiped_timestamp_data = 0;
#define read_all(f, p, n) io_all((f), (p), (n), 0) #define read_all(f, p, n) io_all((f), (p), (n), 0)
#define write_all(f, p, n) io_all((f), (p), (n), 1) #define write_all(f, p, n) io_all((f), (p), (n), 1)
/* FIXME: They should be #included but Eprintf conflicts with mkntfs's Eprintf */
extern int Eprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
extern int Vprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
extern int Qprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
/* FIXME: should be 'static' */
extern int Printf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
GEN_PRINTF(Eprintf, stderr, NULL, FALSE) GEN_PRINTF(Eprintf, stderr, NULL, FALSE)
GEN_PRINTF(Vprintf, msg_out, &opt.verbose, TRUE) GEN_PRINTF(Vprintf, msg_out, &opt.verbose, TRUE)
GEN_PRINTF(Qprintf, msg_out, &opt.quiet, FALSE) GEN_PRINTF(Qprintf, msg_out, &opt.quiet, FALSE)
GEN_PRINTF(Printf, msg_out, NULL, FALSE) static GEN_PRINTF(Printf, msg_out, NULL, FALSE)
static void perr_printf(const char *fmt, ...) static void perr_printf(const char *fmt, ...)

View File

@ -156,14 +156,9 @@ s64 max_free_cluster_range = 0;
#define rounded_up_division(a, b) (((a) + (b - 1)) / (b)) #define rounded_up_division(a, b) (((a) + (b - 1)) / (b))
/* FIXME: They should be included but Eprintf conflicts with mkntfs's Eprintf */
extern int Eprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
extern int Vprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
extern int Qprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
GEN_PRINTF(Eprintf, stderr, NULL, FALSE) GEN_PRINTF(Eprintf, stderr, NULL, FALSE)
GEN_PRINTF(Vprintf, stdout, &opt.verbose, TRUE) GEN_PRINTF(Vprintf, stdout, &opt.verbose, TRUE)
GEN_PRINTF(Qprintf, stdout, NULL, FALSE) GEN_PRINTF(Qprintf, stdout, NULL, FALSE)
/** /**
* perr_printf * perr_printf

View File

@ -58,11 +58,6 @@ const char *ntfs_gpl = "This program is free software, released under the GNU "
#define NTFS_TIME_OFFSET ((s64)(369 * 365 + 89) * 24 * 3600 * 10000000) #define NTFS_TIME_OFFSET ((s64)(369 * 365 + 89) * 24 * 3600 * 10000000)
/* These utilities require the following functions */
extern int Eprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
extern int Vprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
extern int Qprintf (const char *format, ...) __attribute__ ((format (printf, 1, 2)));
/** /**
* utils_set_locale * utils_set_locale
*/ */

View File

@ -70,6 +70,16 @@ extern const char *ntfs_gpl;
return ret; \ return ret; \
} }
/* utils.c's utilities require the following functions implemented.
* Example of implementation is:
* GEN_PRINTF (Eprintf, stderr, NULL, FALSE)
* GEN_PRINTF (Vprintf, stderr, &opts.verbose, TRUE)
* GEN_PRINTF (Qprintf, stderr, &opts.quiet, FALSE)
*/
extern DEC_PRINTF(Eprintf)
extern DEC_PRINTF(Vprintf)
extern DEC_PRINTF(Qprintf)
struct _IO_FILE; struct _IO_FILE;
int ntfs_printf (struct _IO_FILE *stream, int *control, BOOL trigger, int ntfs_printf (struct _IO_FILE *stream, int *control, BOOL trigger,