]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - io/link.c
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2014 Christoph Hellwig.
13 #define AT_EMPTY_PATH 0x1000
16 static cmdinfo_t flink_cmd
;
23 "link the open file descriptor to the supplied filename\n"
34 return command_usage(&flink_cmd
);
36 if (linkat(file
->fd
, "", AT_FDCWD
, argv
[1], AT_EMPTY_PATH
) < 0) {
46 flink_cmd
.name
= "flink";
47 flink_cmd
.cfunc
= flink_f
;
50 flink_cmd
.flags
= CMD_NOMAP_OK
| CMD_FOREIGN_OK
| CMD_FLAG_ONESHOT
;
51 flink_cmd
.args
= _("filename");
53 _("link the open file descriptor to the supplied filename");
54 flink_cmd
.help
= flink_help
;
56 add_command(&flink_cmd
);