#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <stdlib.h>
#include <sys/param.h>
#include <sys/stat.h>
-#include <linux/ext2_fs.h>
-
+#include "ext2fs/ext2_fs.h"
#include "../version.h"
+#include "nls-enable.h"
#define LPF "lost+found"
-void main (int argc, char ** argv)
+int main (int argc, char ** argv)
{
char name [EXT2_NAME_LEN];
- char path [MAXPATHLEN];
+ char path [sizeof (LPF) + 1 + 256];
struct stat st;
int i, j;
int d;
- fprintf (stderr, "mklost+found %s, %s for EXT2 FS %s, %s\n",
- E2FSPROGS_VERSION, E2FSPROGS_DATE,
- EXT2FS_VERSION, EXT2FS_DATE);
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ setlocale(LC_CTYPE, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
+ fprintf (stderr, "mklost+found %s (%s)\n", E2FSPROGS_VERSION,
+ E2FSPROGS_DATE);
if (argc != 1) {
- fprintf (stderr, "Usage: mklost+found\n");
+ (void)argv; /* avoid unused argument warning */
+ fprintf (stderr, _("Usage: mklost+found\n"));
exit(1);
}
- if (mkdir (LPF, 0755) == -1) {
+ if (mkdir (LPF, 0700) == -1) {
perror ("mkdir");
exit(1);
}