From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) by dpdk.org (Postfix) with ESMTP id 31DFF68A2 for ; Tue, 4 Feb 2014 04:31:19 +0100 (CET) Received: by mail-la0-f42.google.com with SMTP id hr13so6160035lab.1 for ; Mon, 03 Feb 2014 19:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=LRYeAkdMjy50+vnFTFU/BuQhSiCO+GOdHvwO431hOSQ=; b=KA50NEcvFfiw/1z+vcaftpa5aG/xKyWsa3ydKmHYywmF1LRdasdAzp44gCp6x/AdEO TTXjnsuh/hbiv9aE5FtDMzCN01u9iIjPhB+pKF547AuxbcZoMU+T4OvbxpERXlvtClbe o9Xqmc8kp9cwt86MIVwqLmlPMpp7N7kqPRwnLpcmuSz++FW93bYTL9bpLNOVOKYx8qVN qr8GQ5cXgIaHa1aHKqQIM7V4bLEqiP0S7KiW/e8E3My/U2cO7qsOohg5K7p1skNdhHBB QX5Bo5YpTMH1EGrTJOm8ijAirOvlaviwzhn1XbJD55wRMATuRZnCfvVQiEIrAO/cn9K6 Sa9w== MIME-Version: 1.0 X-Received: by 10.112.14.1 with SMTP id l1mr183662lbc.39.1391484759179; Mon, 03 Feb 2014 19:32:39 -0800 (PST) Received: by 10.112.161.5 with HTTP; Mon, 3 Feb 2014 19:32:39 -0800 (PST) Date: Tue, 4 Feb 2014 09:02:39 +0530 Message-ID: From: Jyotiswarup Raiturkar To: "dev@dpdk.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: Jyotiswarup Raiturkar Subject: [dpdk-dev] couple of minor compilation errors in DPDK 1.6 (/lib/librte_eal/linuxapp/eal/eal_ivshmem.c) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 03:31:19 -0000 Hi I downloaded DPDK 1.6 from the Intel website and ran into couple of compilation errors with /lib/librte_eal/linuxapp/eal/eal_ivshmem.c. The following changes seem to fix it. Have other people seen these? Thanks Jyoti @@ -472,7 +472,7 @@ rte_snprintf(path, sizeof(path), IVSHMEM_CONFIG_PATH, internal_config.hugefile_prefix); - fd = open(path, O_CREAT | O_RDWR); + fd = open(path, O_CREAT | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO ); if (fd < 0) { RTE_LOG(ERR, EAL, "Could not open %s: %s\n", path, strerror(errno)); @@ -486,7 +486,8 @@ return -1; } - ftruncate(fd, sizeof(struct ivshmem_shared_config)); + if (ftruncate(fd, sizeof(struct ivshmem_shared_config))) { + close(fd); return -1; + } ivshmem_config = mmap(NULL, sizeof(struct ivshmem_shared_config), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);