fsutil: Add support for creating hardlinks.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22749
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:33 +03:00 committed by Alexandre Julliard
parent dd6b64b246
commit 55227375e9
56 changed files with 771 additions and 54 deletions

1
configure vendored
View File

@ -21444,6 +21444,7 @@ wine_fn_config_makefile programs/find enable_find
wine_fn_config_makefile programs/find/tests enable_tests
wine_fn_config_makefile programs/findstr enable_findstr
wine_fn_config_makefile programs/fsutil enable_fsutil
wine_fn_config_makefile programs/fsutil/tests enable_tests
wine_fn_config_makefile programs/hh enable_hh
wine_fn_config_makefile programs/hostname enable_hostname
wine_fn_config_makefile programs/icacls enable_icacls

View File

@ -3979,6 +3979,7 @@ WINE_CONFIG_MAKEFILE(programs/find)
WINE_CONFIG_MAKEFILE(programs/find/tests)
WINE_CONFIG_MAKEFILE(programs/findstr)
WINE_CONFIG_MAKEFILE(programs/fsutil)
WINE_CONFIG_MAKEFILE(programs/fsutil/tests)
WINE_CONFIG_MAKEFILE(programs/hh)
WINE_CONFIG_MAKEFILE(programs/hostname)
WINE_CONFIG_MAKEFILE(programs/icacls)

View File

@ -13157,7 +13157,18 @@ msgstr "ش&غل..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12166,7 +12166,18 @@ msgstr "&Executar..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12462,7 +12462,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12668,7 +12668,18 @@ msgstr "&Executa..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12678,7 +12678,18 @@ msgstr "&Spustit..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13070,7 +13070,18 @@ msgstr "Kø&r..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12631,7 +12631,18 @@ msgstr "&Ausführen..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12249,7 +12249,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12505,11 +12505,25 @@ msgstr "&Run..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr "Syntax: fsutil hardlink create <new> <existing>\n"
#: hostname.rc:30
msgid "Usage: hostname\n"

View File

@ -12505,11 +12505,25 @@ msgstr "&Run..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr "Syntax: fsutil hardlink create <new> <existing>\n"
#: hostname.rc:30
msgid "Usage: hostname\n"

View File

@ -12320,7 +12320,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13142,7 +13142,18 @@ msgstr "E&jecutar..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12203,7 +12203,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12481,7 +12481,18 @@ msgstr "&Suorita..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13043,7 +13043,18 @@ msgstr "E&xécuter..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12712,7 +12712,18 @@ msgstr "הפע&לה..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12000,7 +12000,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12624,7 +12624,18 @@ msgstr "Pok&reni..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13061,7 +13061,18 @@ msgstr "&Futtatás..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13143,7 +13143,18 @@ msgstr "&Esegui..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12496,7 +12496,18 @@ msgstr "実行(&R)..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12543,7 +12543,18 @@ msgstr "실행(&R)..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12509,7 +12509,18 @@ msgstr "&Vykdyti..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12014,7 +12014,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12681,7 +12681,18 @@ msgstr "Kjø&r..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13106,7 +13106,18 @@ msgstr "&Starten..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12000,7 +12000,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12000,7 +12000,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12849,7 +12849,18 @@ msgstr "Urucho&m..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12641,7 +12641,18 @@ msgstr "E&xecutar..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12820,7 +12820,18 @@ msgstr "Exec&utar..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12083,7 +12083,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12900,7 +12900,18 @@ msgstr "E&xecutare..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12560,7 +12560,18 @@ msgstr "&Запустить..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12261,7 +12261,18 @@ msgstr "ධාවනය කරන්න... (&R)"
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12460,7 +12460,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13092,7 +13092,18 @@ msgstr "&Zaženi ..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12734,7 +12734,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12861,7 +12861,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12812,7 +12812,18 @@ msgstr "&Kör..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -11934,7 +11934,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12000,7 +12000,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12282,7 +12282,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12592,7 +12592,18 @@ msgstr "&Çalıştır..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12637,7 +12637,18 @@ msgstr "&Запустити..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12186,7 +12186,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -11917,7 +11917,18 @@ msgstr ""
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -12300,7 +12300,18 @@ msgstr "运行(&R)..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -13067,7 +13067,18 @@ msgstr "執行(&R)..."
msgid ""
"- Supported Commands -\n"
"\n"
"[NONE]\n"
"hardlink hardlink management\n"
msgstr ""
#: fsutil.mc:35
msgid ""
"- Hardlink - Supported Commands -\n"
"\n"
"create create a hardlink\n"
msgstr ""
#: fsutil.mc:40
msgid "Syntax: fsutil hardlink create <new> <existing>\n"
msgstr ""
#: hostname.rc:30

View File

@ -23,5 +23,17 @@ SymbolicName=STRING_USAGE
Language=ENU
- Supported Commands -
[NONE]
hardlink hardlink management
.
MessageId=102
SymbolicName=STRING_HARDLINK_USAGE
Language=ENU
- Hardlink - Supported Commands -
create create a hardlink
.
MessageId=103
SymbolicName=STRING_HARDLINK_CREATE_USAGE
Language=ENU
Syntax: fsutil hardlink create <new> <existing>
.

View File

@ -66,6 +66,54 @@ static int WINAPIV output_string(int msg, ...)
return 0;
}
static BOOL output_error_string(DWORD error)
{
LPWSTR pBuffer;
if (FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER,
NULL, error, 0, (LPWSTR)&pBuffer, 0, NULL))
{
output_write(pBuffer, lstrlenW(pBuffer));
LocalFree(pBuffer);
return TRUE;
}
return FALSE;
}
static int create_hardlink(int argc, WCHAR *argv[])
{
if (argc != 5)
{
output_string(STRING_HARDLINK_CREATE_USAGE);
return 1;
}
if (CreateHardLinkW(argv[3], argv[4], NULL))
return 0;
output_error_string(GetLastError());
return 1;
}
static int hardlink(int argc, WCHAR *argv[])
{
int ret;
if (argc > 2)
{
if (!wcsicmp(argv[2], L"create"))
return create_hardlink(argc, argv);
else
{
FIXME("unsupported parameter %s\n", debugstr_w(argv[2]));
ret = 1;
}
}
output_string(STRING_HARDLINK_USAGE);
return ret;
}
int __cdecl wmain(int argc, WCHAR *argv[])
{
int i, ret = 0;
@ -76,10 +124,15 @@ int __cdecl wmain(int argc, WCHAR *argv[])
TRACE("\n");
if (argc > 1)
{
if (!wcsicmp(argv[1], L"hardlink"))
return hardlink(argc, argv);
else
{
FIXME("unsupported command %s\n", debugstr_w(argv[1]));
ret = 1;
}
}
output_string(STRING_USAGE);
return ret;

View File

@ -19,3 +19,5 @@
#include <windef.h>
#define STRING_USAGE 101
#define STRING_HARDLINK_USAGE 102
#define STRING_HARDLINK_CREATE_USAGE 103

View File

@ -0,0 +1,5 @@
TESTDLL = fsutil.exe
IMPORTS = user32
C_SRCS = \
fsutil.c

View File

@ -0,0 +1,98 @@
/*
* 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
*/
#include <windows.h>
#include <stdio.h>
#include "wine/test.h"
static DWORD runcmd(const char* cmd)
{
STARTUPINFOA si = { sizeof(STARTUPINFOA) };
PROCESS_INFORMATION pi;
char* wcmd;
DWORD rc;
/* Create a writable copy for CreateProcessA() */
wcmd = HeapAlloc(GetProcessHeap(), 0, strlen(cmd) + 1);
strcpy(wcmd, cmd);
rc = CreateProcessA(NULL, wcmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
HeapFree(GetProcessHeap(), 0, wcmd);
if (!rc)
return 260;
rc = WaitForSingleObject(pi.hProcess, 5000);
if (rc == WAIT_OBJECT_0)
GetExitCodeProcess(pi.hProcess, &rc);
else
TerminateProcess(pi.hProcess, 1);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
return rc;
}
static void test_hardlink(void)
{
DWORD rc;
BOOL boolrc;
HANDLE hfile;
BY_HANDLE_FILE_INFORMATION info;
hfile = CreateFileA("file", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
ok(hfile != INVALID_HANDLE_VALUE, "failed to create a file\n");
CloseHandle(hfile);
rc = runcmd("fsutil hardlink create link file");
ok(rc == 0, "failed to create a hardlink\n");
hfile = CreateFileA("link", GENERIC_READ, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
ok(hfile != INVALID_HANDLE_VALUE, "failed to open the hardlink\n");
boolrc = GetFileInformationByHandle(hfile, &info);
ok(boolrc, "failed to get info about hardlink, error %#x\n", GetLastError());
CloseHandle(hfile);
ok(info.nNumberOfLinks == 2, "our link is not a hardlink");
rc = runcmd("fsutil hardlink create link file");
ok(rc == 1, "fsutil didn't complain about already existing destination\n");
rc = runcmd("fsutil hardlink create newlink nonexistingfile");
ok(rc == 1, "fsutil didn't complain about nonexisting source file\n");
boolrc = DeleteFileA("link");
ok(boolrc, "failed to delete the hardlink, error %#x\n", GetLastError());
boolrc = DeleteFileA("file");
ok(boolrc, "failed to delete the file, error %#x\n", GetLastError());
}
START_TEST(fsutil)
{
char tmpdir[MAX_PATH];
GetTempPathA(MAX_PATH, tmpdir);
SetCurrentDirectoryA(tmpdir);
test_hardlink();
}