X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsendfile.c;h=54aceb622e9de0b4744f7d07b532cce7c7409e1b;hb=9b8e8e0e54e5055c02469cb16d186c94fa2040e0;hp=5cfa1108752fe42c87900cb4239c3b34916622a0;hpb=fbf5870b9848929d352460f1f005b79c0b5ccc5a;p=fs%2Flustre-release.git diff --git a/lustre/tests/sendfile.c b/lustre/tests/sendfile.c index 5cfa110..54aceb6 100644 --- a/lustre/tests/sendfile.c +++ b/lustre/tests/sendfile.c @@ -1,6 +1,4 @@ -/* -*- 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. @@ -17,16 +15,12 @@ * * 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. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -38,18 +32,15 @@ #include #include #include +#include +#include #include #include #include #include #include -#include -#include -#include -#include -#include -#include +#include #define syserr(str) { perror(str); exit(-1); } @@ -148,6 +139,6 @@ int main(int argc, char *argv[]) } close(sd[1]), close(infd), close(outfd); - sprintf(cmd, "cmp %s %s\n", sfile, tfile); + snprintf(cmd, sizeof(cmd), "cmp %s %s\n", sfile, tfile); return system(cmd); }