X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fmlink.c;h=aa36d460e4194493683ff645b0bc001ae4c90639;hb=b6333589fb05feadccae86acfb6ceeeba87f8b9b;hp=5688b9fe1c590d912856696bc49c91e93d6603b6;hpb=040033cef24c5aca2967daf2da7a862abcd074cf;p=fs%2Flustre-release.git diff --git a/lustre/tests/mlink.c b/lustre/tests/mlink.c old mode 100755 new mode 100644 index 5688b9f..aa36d46 --- a/lustre/tests/mlink.c +++ b/lustre/tests/mlink.c @@ -1,3 +1,35 @@ +/* + * GPL HEADER START + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. + * + * This program 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 + * General Public License version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU General Public License + * version 2 along with this program; If not, see + * http://www.gnu.org/licenses/gpl-2.0.html + * + * GPL HEADER END + */ +/* + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. + * + * Copyright (c) 2013, Intel Corporation. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. + */ + #include #include #include @@ -8,18 +40,18 @@ int main(int argc, char ** argv) { - int rc; + int rc; - if (argc < 3) { - printf("Usage: %s file link\n", argv[0]); - return 1; - } + if (argc < 3) { + fprintf(stderr, "usage: %s file link\n", argv[0]); + return 1; + } - rc = link(argv[1], argv[2]); - if (rc) { - printf("link(%s, %s) error: %s\n", argv[1], argv[2], - strerror(errno)); + rc = link(argv[1], argv[2]); + if (rc) { + fprintf(stderr, "link(%s, %s) error: %s\n", + argv[1], argv[2], strerror(errno)); return errno; - } + } return 0; -} +}