{"id":811366,"url":"http://patchwork.ozlabs.org/api/patches/811366/?format=json","web_url":"http://patchwork.ozlabs.org/project/swupdate/patch/20170908074122.25961-1-christian.storm@siemens.com/","project":{"id":58,"url":"http://patchwork.ozlabs.org/api/projects/58/?format=json","name":"swupdate development","link_name":"swupdate","list_id":"swupdate.googlegroups.com","list_email":"swupdate@googlegroups.com","web_url":"https://github.com/sbabic/swupdate","scm_url":"git://github.com/sbabic/swupdate","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170908074122.25961-1-christian.storm@siemens.com>","list_archive_url":null,"date":"2017-09-08T07:41:22","name":"util: remove unused method isDirectoryEmpty()","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"5394d02574c246a049cd3363ab347b31d3cf51bc","submitter":{"id":72180,"url":"http://patchwork.ozlabs.org/api/people/72180/?format=json","name":"Storm, Christian","email":"christian.storm@siemens.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/swupdate/patch/20170908074122.25961-1-christian.storm@siemens.com/mbox/","series":[{"id":2118,"url":"http://patchwork.ozlabs.org/api/series/2118/?format=json","web_url":"http://patchwork.ozlabs.org/project/swupdate/list/?series=2118","date":"2017-09-08T07:41:22","name":"util: remove unused method isDirectoryEmpty()","version":1,"mbox":"http://patchwork.ozlabs.org/series/2118/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811366/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811366/checks/","tags":{},"related":[],"headers":{"Return-Path":"<swupdate+bncBDD6BWV65QPBBNEUZHGQKGQEDVWGYYQ@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:400c:c09::240;\n\thelo=mail-wm0-x240.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbbneuzhgqkgqedvwgyyq@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"q2+UttkT\"; dkim-atps=neutral"],"Received":["from mail-wm0-x240.google.com (mail-wm0-x240.google.com\n\t[IPv6:2a00:1450:400c:c09::240])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpTpd4LPWz9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 17:43:52 +1000 (AEST)","by mail-wm0-x240.google.com with SMTP id e64sf108250wmi.3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 08 Sep 2017 00:43:52 -0700 (PDT)","by 10.28.113.23 with SMTP id m23ls206602wmc.5.gmail; Fri, 08 Sep\n\t2017 00:43:47 -0700 (PDT)","from david.siemens.de (david.siemens.de. [192.35.17.14])\n\tby gmr-mx.google.com with ESMTPS id\n\ti90si86594wmh.5.2017.09.08.00.43.47 for <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 00:43:47 -0700 (PDT)","from mail1.siemens.de (mail1.siemens.de [139.23.33.14])\n\tby david.siemens.de (8.15.2/8.15.2) with ESMTPS id v887hk6a022075\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Fri, 8 Sep 2017 09:43:46 +0200","from MD1KR9XC.ad001.siemens.net ([139.25.69.251])\n\tby mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v887hkTu009933;\n\tFri, 8 Sep 2017 09:43:46 +0200"],"ARC-Seal":["i=2; a=rsa-sha256; t=1504856628; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=j9lyJMn0xsJB7gvdtPYmdrlYpJ/ncu2misr4TKZ15E5l1q7hcNkDAt0k2912B5mH2x\n\tMZJOZgF4ZBPF2K2GrgxPmSvgV05WdLSDf78dV4HwC1IGGdVUxvCfFSNiPDwUnb4C7G68\n\tWO4lA6eYJv6T8ZRIPg0pO3hRoA481592vGiCSIuJIzqHMiN2aR+w+xZSF3sWC5AmmULO\n\tUL6JQrQRkBSzG/fCmZWDOdKeUAwE2IzkOJfZhtxiV82gmkAvGSN7RlWPxgH7O8nkZpvq\n\ttKP8V1X3bfL/GSCIcsEF13zWZ4nPSsLgMiSeuurpL9YAHH5TM6L4fu1xjRDJO9nJbZLZ\n\teV5w==","i=1; a=rsa-sha256; t=1504856627; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=RLuhDMAmSJMfmDIlrHDmAbLtxzcqQoLBqHxTas2aRimq382a+2BMBkzJWhg+L5vfOY\n\tmrqfHg+e9u9ra12EfUa8yPmPmejJHeXjT+Zz5FX6GX4UYtppMFCT8XhFw+epy2/Qdn4K\n\tHPKcy7yvMcoEjt0vPjEQg/xa+PkWo84hkypc6S+pAd2kCHOPDztXjhMTK45doaYjnV5C\n\ttZhVTHxqKurhcjkrtmB3Gw8lYTNrrEfbhUDLYYiwjGajleBU23wCXSiWklBYnGd7VPRs\n\tTMPf3SW7P+yJNHxmmSJ6az8mntMQPa/2JSJTCr5GUWSo3iS/xxZ+TpCiLgsZ2+APQxPv\n\teUrg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:message-id:date:subject:cc:to:from\n\t:arc-authentication-results:arc-message-signature:mime-version\n\t:sender:dkim-signature:arc-authentication-results;\n\tbh=7tWCvh2lZCzX9kMq7kZA7A8D8hJn+G9G/GSCl9HV1Xw=;\n\tb=IVaWffAkhvpCombM+GC3JTAguhIs4c9Xd7m6vJx9/2GKku3rDDVVnUnnrfRjHmFsje\n\tN2L/0ceIVUgpL0hpwZ2o0E2Qpv5WxN5+7xGoMm7aeG8PGTDiVRko/KrwAeOuWcMvvaZK\n\t+iUOaUpS4MehcgaK1SxVaKJWALYpD0K8//mJSvZGLV+wNbMW0ojR6t/bjU6EHd0B9twU\n\tyT3VfUCMACkrRZ7LsgAkx4Nu2GGyH44EKKmAfJu+6lWk/SgoCiJsk79IVDmjBG4EWaIU\n\telmu7jJQU0kAyadUEWUTPhiXUbNrEM5BOACLr2obqvOE7mpwxSOtNSyx/bTxVUhqMLCR\n\tgACQ==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=message-id:date:subject:cc:to:from:arc-authentication-results;\n\tbh=I2F6U8DhOYAyILv+F/ob7zCKIAjhKXXUSdOqawAwuyU=;\n\tb=e0gTcM4uO98Lw29CtlZusVrek46lpTBgKFeS3rSkh6S5G22Y4e+oOuZBQRIDYQ+RGz\n\t3VqY97hsInpNzlZCRtybwbA0suUy4Bet1BzJHrfYcqV0Lg9prSNYtY8AreNM8GID5Rr7\n\tTVUrrWuKLVpQ+JVO6Id0d41+vzBwIKLuZb7tvRj3PDt56QxpMDF6hdEPOZi/Lvl3TyZM\n\tpEC1vVdQc3H/JVKqnSX1KD+D45FjMoD6+x3ULCx5NANuBZrWK8hmL9C5Qik6EC/C5jXC\n\tlUsZKKnneKP154HmihMnNtVo2l7Dmw+Qt+3bxQsuA72bMC7rsmL6DXWSQba6oiTmIpNv\n\tiMAw=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.14 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.14 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:mime-version:from:to:cc:subject:date:message-id\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=7tWCvh2lZCzX9kMq7kZA7A8D8hJn+G9G/GSCl9HV1Xw=;\n\tb=q2+UttkTUA+xM57lRUASi1yExId5oxdLcwq0a1lcZPs5M/salvUNP20L61/a8GWJYh\n\tciaCBCeN8DVxcClTPO1g+OXpAf+vqVsjvOZh5yKODj/uq8odzY0mOKjq92+pULnQZ7/z\n\tVKC1iZE9O/UkLEKOW+ujMfA+Zaopuu+7GkM6csrZlc4ezWdJ+OaidPdocJJ2vXqAGMeG\n\tUEqvSe/ssoFiIvNZzxCqj/1yW7m4vP4U2lCNFOkYcDE7t9NCmUS5Zyxlx5kiXyOZ03xv\n\tQ9BnZd4GPZAH1E1YxfI2fyn0KahzI4z/uA9yPKaiJ2KWzPReoMKdS26rHnfGn/e961Q2\n\t+mkA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:mime-version:from:to:cc:subject:date\n\t:message-id:x-original-sender:x-original-authentication-results\n\t:precedence:mailing-list:list-id:x-spam-checked-in-group:list-post\n\t:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=7tWCvh2lZCzX9kMq7kZA7A8D8hJn+G9G/GSCl9HV1Xw=;\n\tb=aSYkT+0cC75JZ9hjwN2uJId2VR968W0tHcqIe5S7br2NP1zK41jFc2R/ZEDkNWAsr0\n\tO4pyoOG7oYl7B29dwEpNM+vhcXpeXtyS1UDPWYs/u6nvzZ9v/KNXFSD9CWUj7OFMgO8G\n\t4iYMGKbmXdceRRd7ixKjvihw4x9svXC+Bt77IDmm6Ur6C0RfShFLWZNWi5/aJr30DjT8\n\t7mvDww43doCP1+8NrQv6EzxcYe7otpFn4uv7G3N0nFZ3c6pg2RJ7BNJK88MoVGiBrp75\n\toWIgh81FM5lWSwhJl8v/Wtn2YET36CnwPsUUHIxz8LyQ8blLxqnaK5bL7GFJJ4zblDHW\n\tMvgg==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHPjjUiBTVFt2fp0BpR0vVHzerGdByTAkJl33WweqnnxDskSDUtHNn+r\n\trKumjSkdKa2GWQ==","X-Google-Smtp-Source":"AOwi7QAZyP8+j2TSZzKoswp0keyNmEDvX4FvllCPmROl3NwIcD7YB0oyCkECoGys2GVHRfFBQ3GjmQ==","X-Received":["by 10.28.29.199 with SMTP id d190mr1752wmd.25.1504856628206;\n\tFri, 08 Sep 2017 00:43:48 -0700 (PDT)","by 10.28.101.133 with SMTP id z127mr122261wmb.32.1504856627865; \n\tFri, 08 Sep 2017 00:43:47 -0700 (PDT)"],"MIME-Version":"1.0","X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 192.35.17.14 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.14; ","From":"Christian Storm <christian.storm@siemens.com>","To":"swupdate@googlegroups.com","Cc":"Christian Storm <christian.storm@siemens.com>","Subject":"[swupdate] [PATCH] util: remove unused method isDirectoryEmpty()","Date":"Fri,  8 Sep 2017 09:41:22 +0200","Message-Id":"<20170908074122.25961-1-christian.storm@siemens.com>","X-Mailer":"git-send-email 2.14.1","X-Original-Sender":"christian.storm@siemens.com","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.14 is neither permitted nor denied by best\n\tguess\n\trecord for domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","Content-Type":"text/plain; charset=\"UTF-8\"","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"},"content":"The isDirectoryEmpty() method is not used and is inconsistently\nnamed, remove it.\n\nSigned-off-by: Christian Storm <christian.storm@siemens.com>\n---\n core/util.c    | 21 ---------------------\n include/util.h |  1 -\n 2 files changed, 22 deletions(-)","diff":"diff --git a/core/util.c b/core/util.c\nindex b714f29..5590f8b 100644\n--- a/core/util.c\n+++ b/core/util.c\n@@ -112,27 +112,6 @@ int openfileoutput(const char *filename)\n \treturn fdout;\n }\n \n-int isDirectoryEmpty(const char *dirname)\n-{\n-\tint n = 0;\n-\tstruct dirent *d;\n-\tDIR *dir = opendir(dirname);\n-\n-\tif (dir == NULL)\n-\t\treturn 1;\n-\n-\twhile ((d = readdir(dir)) != NULL) {\n-\t\tif(++n > 2)\n-\t\t\tbreak;\n-  \t}\n-\tclosedir(dir);\n-\n-\tif (n <= 2)\n-\t\treturn 1;\n-\n-\treturn 0;\n-}\n-\n /*\n  * This function is strict bounded with the hardware\n  * It reads some GPIOs to get the hardware revision\ndiff --git a/include/util.h b/include/util.h\nindex 70a0acc..082a962 100644\n--- a/include/util.h\n+++ b/include/util.h\n@@ -163,7 +163,6 @@ int syslog_init(void);\n char **splitargs(char *args, int *argc);\n char** string_split(char* a_str, const char a_delim);\n void freeargs (char **argv);\n-int isDirectoryEmpty(const char *dirname);\n int get_hw_revision(struct hw_type *hw);\n void get_sw_versions(char *cfgfname, struct swupdate_cfg *sw);\n int check_hw_compatibility(struct swupdate_cfg *cfg);\n","prefixes":[]}