X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fopenfilleddirunlink.c;h=b60118582d37ba06bb27ee87932ef9577e3dd5b6;hb=ef82e43c8ff4b060ca4519816dc049a54bb24374;hp=6c7707fa9a7a6cfc38649ba667e6d12091558ebb;hpb=2dc9c16e770415d56839e1996015fec5fab93f29;p=fs%2Flustre-release.git diff --git a/lustre/tests/openfilleddirunlink.c b/lustre/tests/openfilleddirunlink.c index 6c7707f..b601185 100644 --- a/lustre/tests/openfilleddirunlink.c +++ b/lustre/tests/openfilleddirunlink.c @@ -1,9 +1,41 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: +/* + * 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.sun.com/software/products/lustre/docs/GPLv2.pdf + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + * GPL HEADER END + */ +/* + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. */ /* for O_DIRECTORY */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include #include @@ -40,7 +72,7 @@ int main(int argc, char **argv) exit(1); } - sprintf(fname, "%s/0", dname1); + snprintf(fname, sizeof(fname), "%s/0", dname1); fprintf(stderr, "creating file %s\n", fname); fd = creat(fname, 0666); if (fd < 0) {