]> git.saurik.com Git - apple/system_cmds.git/commitdiff
system_cmds-735.50.6.tar.gz macos-10124 macos-10125 macos-10126 v735.50.6
authorApple <opensource@apple.com>
Wed, 29 Mar 2017 19:58:42 +0000 (19:58 +0000)
committerApple <opensource@apple.com>
Wed, 29 Mar 2017 19:58:42 +0000 (19:58 +0000)
fs_usage.tproj/fs_usage.c
latency.tproj/latency.c
system_cmds.xcodeproj/project.pbxproj

index 24ec95886a08e415ab68824f3794be3ac2dced67..52894219fd8b7ea599984c6a9cea4248f1caf7af 100644 (file)
 #include <ktrace.h>
 #include <assert.h>
 
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/mman.h>
 #include <sys/disk.h>
-#include <sys/file.h>
 #include <sys/fcntl.h>
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/syslimits.h>
+#include <sys/time.h>
+#include <sys/types.h>
 
 #import <mach/clock_types.h>
 #import <mach/mach_time.h>
@@ -3003,6 +3004,8 @@ fd_set_is_network(pid_t pid, unsigned long fd, bool set)
 
        if (pid < 0)
                return;
+       if (fd > OPEN_MAX)
+               return;
 
        pfs = pfs_get(pid);
 
@@ -3013,7 +3016,7 @@ fd_set_is_network(pid_t pid, unsigned long fd, bool set)
 
                newsize = MAX((fd + CHAR_BIT) / CHAR_BIT, 2 * pfs->setsize);
                pfs->set = reallocf(pfs->set, newsize);
-               assert(pfs->set);
+               assert(pfs->set != NULL);
 
                bzero(pfs->set + pfs->setsize, newsize - pfs->setsize);
                pfs->setsize = newsize;
index 8047b2d84d46e651dd3bccaa060517b0d61c4175..b48bc5562a55f7876102ed1ab1d83d3a0011a431 100644 (file)
@@ -365,6 +365,8 @@ quit(char *s)
                        set_remove();
                }
        }
+       endwin();
+
        printf("latency: ");
        if (s) {
                printf("%s", s);
@@ -2583,7 +2585,7 @@ do_kernel_nm(void)
        /*
         * Build the nm command and create a tmp file with the output
         */
-       sprintf (tmpstr, "/usr/bin/nm -f -n -s __TEXT __text %s > %s",
+       sprintf (tmpstr, "/usr/bin/nm -n %s -s __TEXT __text > %s",
                 kernelpath, tmp_nm_file);
        system(tmpstr);
 
index de9e5dfcebf8025cd4042be1be3ddd377776c42c..4b34aee34b780490f9fdde416d04439819d61d8c 100644 (file)
                                BACC1D341377B58A007728F4 /* PBXTargetDependency */,
                                BACC1D361377B58A007728F4 /* PBXTargetDependency */,
                                BACC1D3A1377B58A007728F4 /* PBXTargetDependency */,
+                               8E556A4B1D3FF7A40038D48B /* PBXTargetDependency */,
                        );
                        name = All_iOS;
                        productName = All_iOS;
                        remoteGlobalIDString = 78DE9DDF1B5045DE00FE6DF5;
                        remoteInfo = wait4path;
                };
+               8E556A4A1D3FF7A40038D48B /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = BA2DE9181372FA9100D1913C /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 8EC3915B1C9733C2001E28E6;
+                       remoteInfo = proc_uuid_policy;
+               };
                8EC3916D1C973440001E28E6 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = BA2DE9181372FA9100D1913C /* Project object */;
                        target = 78DE9DDF1B5045DE00FE6DF5 /* wait4path */;
                        targetProxy = 78DE9DF91B504D1200FE6DF5 /* PBXContainerItemProxy */;
                };
+               8E556A4B1D3FF7A40038D48B /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 8EC3915B1C9733C2001E28E6 /* proc_uuid_policy */;
+                       targetProxy = 8E556A4A1D3FF7A40038D48B /* PBXContainerItemProxy */;
+               };
                8EC3916E1C973440001E28E6 /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = 8EC3915B1C9733C2001E28E6 /* proc_uuid_policy */;