Commit dd6b64b2 authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

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: 's avatarVijay Kiran Kamuju <infyquest@gmail.com> Signed-off-by: 's avatarArkadiusz Hiler <ahiler@codeweavers.com> Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 54222446
......@@ -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"
......
......@@ -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 ""
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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 ""
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
......@@ -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 ""
......
......@@ -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 ""
......
......@@ -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"
......
......@@ -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"
......
MODULE = fsutil.exe
IMPORTS = user32
EXTRADLLFLAGS = -mconsole -municode -mno-cygwin
C_SRCS = \
main.c
MC_SRCS = \
fsutil.mc
;
; 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]
.
/*
* 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);
static void output_write(const WCHAR *str, DWORD wlen)
{
DWORD count, ret;
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;
int i, ret = 0;
WINE_FIXME("stub:");
TRACE("Command line:");
for (i = 0; i < argc; i++)
WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
WINE_FIXME("\n");
TRACE(" %s", debugstr_w(argv[i]));
TRACE("\n");
return 0;
if (argc > 1)
{
FIXME("unsupported command %s\n", debugstr_w(argv[1]));
ret = 1;
}
output_string(STRING_USAGE);
return ret;
}
/*
* 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment