fsutil: Print out usage message.

Fsutil doesn't do anything yet other than printing out usage message. This
patch puts some thing in place in preparation for the implementation of
hardlink subcommand.

Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2020-08-05 12:18:32 +03:00 committed by Alexandre Julliard
parent 54222446aa
commit dd6b64b246
53 changed files with 460 additions and 6 deletions

View File

@ -13153,6 +13153,13 @@ msgstr "بدء التشغيل"
msgid "&Run..."
msgstr "ش&غل..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "الاستخدام: hostname\n"

View File

@ -12162,6 +12162,13 @@ msgstr ""
msgid "&Run..."
msgstr "&Executar..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12458,6 +12458,13 @@ msgstr "Рестартиране"
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12664,6 +12664,13 @@ msgstr "Inici"
msgid "&Run..."
msgstr "&Executa..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Ús: hostname\n"

View File

@ -12674,6 +12674,13 @@ msgstr "Start"
msgid "&Run..."
msgstr "&Spustit..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Použití: název počítače\n"

View File

@ -13066,6 +13066,13 @@ msgstr "Start op"
msgid "&Run..."
msgstr "Kø&r..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Brug: værtsnavn\n"

View File

@ -12627,6 +12627,13 @@ msgstr "Start"
msgid "&Run..."
msgstr "&Ausführen..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Aufruf: hostname\n"

View File

@ -12245,6 +12245,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12501,6 +12501,16 @@ msgstr "Start"
msgid "&Run..."
msgstr "&Run..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Usage: hostname\n"

View File

@ -12501,6 +12501,16 @@ msgstr "Start"
msgid "&Run..."
msgstr "&Run..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Usage: hostname\n"

View File

@ -12316,6 +12316,13 @@ msgstr "Starto"
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -13138,6 +13138,13 @@ msgstr "Arranque"
msgid "&Run..."
msgstr "E&jecutar..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Uso: hostname\n"

View File

@ -12199,6 +12199,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12477,6 +12477,13 @@ msgstr "Käynnistä"
msgid "&Run..."
msgstr "&Suorita..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Käyttö: hostname\n"

View File

@ -13039,6 +13039,13 @@ msgstr "Démarrer"
msgid "&Run..."
msgstr "E&xécuter..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Usage : hostname\n"

View File

@ -12708,6 +12708,13 @@ msgstr "תפריט ההתחלה"
msgid "&Run..."
msgstr "הפע&לה..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Usage: hostname\n"

View File

@ -11996,6 +11996,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12620,6 +12620,13 @@ msgstr "'Start' izbornik"
msgid "&Run..."
msgstr "Pok&reni..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Uporaba: hostname\n"

View File

@ -13057,6 +13057,13 @@ msgstr "Indítópult"
msgid "&Run..."
msgstr "&Futtatás..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Használat: kiszolgálónév\n"

View File

@ -13139,6 +13139,13 @@ msgstr "Esecuzione automatica"
msgid "&Run..."
msgstr "&Esegui..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Uso: hostname\n"

View File

@ -12492,6 +12492,13 @@ msgstr "スタート"
msgid "&Run..."
msgstr "実行(&R)..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "使い方: hostname\n"

View File

@ -12539,6 +12539,13 @@ msgstr "시작"
msgid "&Run..."
msgstr "실행(&R)..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "사용법: hostname\n"

View File

@ -12505,6 +12505,13 @@ msgstr "Pradžia"
msgid "&Run..."
msgstr "&Vykdyti..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Naudojimas: hostname\n"

View File

@ -12010,6 +12010,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12677,6 +12677,13 @@ msgstr "Start"
msgid "&Run..."
msgstr "Kjø&r..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Bruk: hostname\n"

View File

@ -13102,6 +13102,13 @@ msgstr "Opstarten"
msgid "&Run..."
msgstr "&Starten..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Gebruik: hostname\n"

View File

@ -11996,6 +11996,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -11996,6 +11996,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12845,6 +12845,13 @@ msgstr "Start"
msgid "&Run..."
msgstr "Urucho&m..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Użycie: hostname\n"

View File

@ -12637,6 +12637,13 @@ msgstr "Iniciar"
msgid "&Run..."
msgstr "E&xecutar..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Modo de usar: hostname\n"

View File

@ -12816,6 +12816,13 @@ msgstr "Iniciar"
msgid "&Run..."
msgstr "Exec&utar..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Uso: hostname\n"

View File

@ -12079,6 +12079,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12896,6 +12896,13 @@ msgstr "Meniu Start"
msgid "&Run..."
msgstr "E&xecutare..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Sintaxă: hostname\n"

View File

@ -12556,6 +12556,13 @@ msgstr "Пуск"
msgid "&Run..."
msgstr "&Запустить..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Использование: hostname\n"

View File

@ -12257,6 +12257,13 @@ msgstr "ඇරඹුම"
msgid "&Run..."
msgstr "ධාවනය කරන්න... (&R)"
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "භාවිතය: hostname\n"

View File

@ -12456,6 +12456,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -13088,6 +13088,13 @@ msgstr "Zagon"
msgid "&Run..."
msgstr "&Zaženi ..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Uporaba: hostname\n"

View File

@ -12730,6 +12730,13 @@ msgstr "„Старт“ мени"
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12857,6 +12857,13 @@ msgstr "„Start“ meni"
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12808,6 +12808,13 @@ msgstr "Start"
msgid "&Run..."
msgstr "&Kör..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Användning: hostname\n"

View File

@ -11930,6 +11930,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -11996,6 +11996,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12278,6 +12278,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12588,6 +12588,13 @@ msgstr "Başlangıç"
msgid "&Run..."
msgstr "&Çalıştır..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Kullanım: hostname\n"

View File

@ -12633,6 +12633,13 @@ msgstr "Пуск"
msgid "&Run..."
msgstr "&Запустити..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "Використання: hostname\n"

View File

@ -12182,6 +12182,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -11913,6 +11913,13 @@ msgstr ""
msgid "&Run..."
msgstr ""
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr ""

View File

@ -12296,6 +12296,13 @@ msgstr "起点"
msgid "&Run..."
msgstr "运行(&R)..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "用法hostname\n"

View File

@ -13063,6 +13063,13 @@ msgstr "啟動"
msgid "&Run..."
msgstr "執行(&R)..."
#: fsutil.mc:28
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
msgstr ""
#: hostname.rc:30
msgid "Usage: hostname\n"
msgstr "用法:主機名稱\n"

View File

@ -1,6 +1,10 @@
MODULE = fsutil.exe
IMPORTS = user32
EXTRADLLFLAGS = -mconsole -municode -mno-cygwin
C_SRCS = \
main.c
MC_SRCS = \
fsutil.mc

27
programs/fsutil/fsutil.mc Normal file
View File

@ -0,0 +1,27 @@
;
; Copyright 2020 Arkadiusz Hiler for CodeWeavers
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2.1 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
;
LanguageNames=(ENU=0x409:fsutil)
MessageId=101
SymbolicName=STRING_USAGE
Language=ENU
- Supported Commands -
[NONE]
.

View File

@ -1,5 +1,6 @@
/*
* Copyright 2016 Austin English
* Copyright 2016 Michael Müller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -16,18 +17,70 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windows.h>
#include "wine/debug.h"
#include "resources.h"
WINE_DEFAULT_DEBUG_CHANNEL(fsutil);
int __cdecl wmain(int argc, WCHAR *argv[])
static void output_write(const WCHAR *str, DWORD wlen)
{
int i;
DWORD count, ret;
WINE_FIXME("stub:");
for (i = 0; i < argc; i++)
WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
WINE_FIXME("\n");
ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), str, wlen, &count, NULL);
if (!ret)
{
DWORD len;
char *msgA;
/* On Windows WriteConsoleW() fails if the output is redirected. So fall
* back to WriteFile(), assuming the console encoding is still the right
* one in that case.
*/
len = WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, NULL, 0, NULL, NULL);
msgA = HeapAlloc(GetProcessHeap(), 0, len * sizeof(char));
if (!msgA) return;
WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, msgA, len, NULL, NULL);
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
HeapFree(GetProcessHeap(), 0, msgA);
}
}
static int WINAPIV output_string(int msg, ...)
{
WCHAR out[8192];
__ms_va_list arguments;
int len;
__ms_va_start(arguments, msg);
len = FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE, NULL, msg, 0, out, ARRAY_SIZE(out), &arguments);
__ms_va_end(arguments);
if (len == 0 && GetLastError() != NO_ERROR)
WINE_FIXME("Could not format string: le=%u, msg=%d\n", GetLastError(), msg);
else
output_write(out, len);
return 0;
}
int __cdecl wmain(int argc, WCHAR *argv[])
{
int i, ret = 0;
TRACE("Command line:");
for (i = 0; i < argc; i++)
TRACE(" %s", debugstr_w(argv[i]));
TRACE("\n");
if (argc > 1)
{
FIXME("unsupported command %s\n", debugstr_w(argv[1]));
ret = 1;
}
output_string(STRING_USAGE);
return ret;
}

View File

@ -0,0 +1,21 @@
/*
* Copyright 2016 Michael Müller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windef.h>
#define STRING_USAGE 101