Przeglądaj źródła

Fix camel case in DkStreamAttributes{Query,Set}ByHandle

Michał Kowalczyk 5 lat temu
rodzic
commit
281a05ce48

+ 2 - 2
LibOS/shim/src/fs/chroot/fs.c

@@ -221,7 +221,7 @@ static int __query_attr (struct shim_dentry * dent,
     enum shim_file_type old_type = data->type;
 
     if (pal_handle ?
-        !DkStreamAttributesQuerybyHandle(pal_handle, &pal_attr) :
+        !DkStreamAttributesQueryByHandle(pal_handle, &pal_attr) :
         !DkStreamAttributesQuery(qstrgetstr(&data->host_uri), &pal_attr))
         return -PAL_ERRNO;
 
@@ -1282,7 +1282,7 @@ static int chroot_chmod (struct shim_dentry * dent, mode_t mode)
 
     PAL_STREAM_ATTR attr = { .share_flags = mode };
 
-    if (!DkStreamAttributesSetbyHandle(pal_hdl, &attr)) {
+    if (!DkStreamAttributesSetByHandle(pal_hdl, &attr)) {
         DkObjectClose(pal_hdl);
         return -PAL_ERRNO;
     }

+ 3 - 3
LibOS/shim/src/fs/pipe/fs.c

@@ -115,7 +115,7 @@ static int pipe_poll (struct shim_handle * hdl, int poll_type)
     }
 
     PAL_STREAM_ATTR attr;
-    if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr)) {
+    if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr)) {
         ret = -PAL_ERRNO;
         goto out;
     }
@@ -145,7 +145,7 @@ static int pipe_setflags (struct shim_handle * hdl, int flags)
 
     PAL_STREAM_ATTR attr;
 
-    if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr))
+    if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr))
         return -PAL_ERRNO;
 
     if (attr.nonblocking) {
@@ -160,7 +160,7 @@ static int pipe_setflags (struct shim_handle * hdl, int flags)
         attr.nonblocking = PAL_TRUE;
     }
 
-    if (!DkStreamAttributesSetbyHandle(hdl->pal_handle, &attr))
+    if (!DkStreamAttributesSetByHandle(hdl->pal_handle, &attr))
        return -PAL_ERRNO;
 
     return 0;

+ 4 - 4
LibOS/shim/src/fs/socket/fs.c

@@ -150,7 +150,7 @@ static int socket_hstat (struct shim_handle * hdl, struct stat * stat)
 
     PAL_STREAM_ATTR attr;
 
-    if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr))
+    if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr))
         return -PAL_ERRNO;
 
     memset(stat, 0, sizeof(struct stat));
@@ -217,7 +217,7 @@ static int socket_poll (struct shim_handle * hdl, int poll_type)
     }
 
     PAL_STREAM_ATTR attr;
-    if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr)) {
+    if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr)) {
         ret = -PAL_ERRNO;
         goto out;
     }
@@ -252,7 +252,7 @@ static int socket_setflags (struct shim_handle * hdl, int flags)
 
     PAL_STREAM_ATTR attr;
 
-    if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr))
+    if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr))
         return -PAL_ERRNO;
 
     if (attr.nonblocking) {
@@ -267,7 +267,7 @@ static int socket_setflags (struct shim_handle * hdl, int flags)
         attr.nonblocking = PAL_TRUE;
     }
 
-    if (!DkStreamAttributesSetbyHandle(hdl->pal_handle, &attr))
+    if (!DkStreamAttributesSetByHandle(hdl->pal_handle, &attr))
        return -PAL_ERRNO;
 
     return 0;

+ 1 - 1
LibOS/shim/src/ipc/shim_ipc_helper.c

@@ -913,7 +913,7 @@ update_status:
         }
 
         PAL_STREAM_ATTR attr;
-        if (!DkStreamAttributesQuerybyHandle(polled, &attr)) {
+        if (!DkStreamAttributesQueryByHandle(polled, &attr)) {
             debug("port %p (handle %p) is removed at querying\n",
                   pobj, polled);
             del_ipc_port_fini(pobj, -PAL_ERRNO);

+ 1 - 1
LibOS/shim/src/shim_init.c

@@ -467,7 +467,7 @@ int init_manifest (PAL_HANDLE manifest_handle)
         size = PAL_CB(manifest_preload.end) - PAL_CB(manifest_preload.start);
     } else {
         PAL_STREAM_ATTR attr;
-        if (!DkStreamAttributesQuerybyHandle(manifest_handle, &attr))
+        if (!DkStreamAttributesQueryByHandle(manifest_handle, &attr))
             return -PAL_ERRNO;
 
         size = attr.pending_size;

+ 1 - 1
LibOS/shim/src/sys/shim_epoll.c

@@ -338,7 +338,7 @@ retry:
     }
 
     PAL_STREAM_ATTR attr;
-    if (!DkStreamAttributesQuerybyHandle(polled, &attr))
+    if (!DkStreamAttributesQueryByHandle(polled, &attr))
         goto reply;
 
     listp_for_each_entry(epoll_fd, &epoll->fds, list)

+ 1 - 1
LibOS/shim/src/sys/shim_ioctl.c

@@ -426,7 +426,7 @@ int shim_do_ioctl (int fd, int cmd, unsigned long arg)
 
             if (hdl->pal_handle) {
                 PAL_STREAM_ATTR attr;
-                if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr)) {
+                if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr)) {
                     ret = -PAL_ERRNO;
                     break;
                 }

+ 1 - 1
LibOS/shim/src/sys/shim_poll.c

@@ -321,7 +321,7 @@ done_finding:
             break;
 
         PAL_STREAM_ATTR attr;
-        if (!DkStreamAttributesQuerybyHandle(polled, &attr))
+        if (!DkStreamAttributesQueryByHandle(polled, &attr))
             break;
 
         n = &polling;

+ 6 - 6
LibOS/shim/src/sys/shim_socket.c

@@ -902,14 +902,14 @@ int __do_accept (struct shim_handle * hdl, int flags, struct sockaddr * addr,
     if (flags & O_NONBLOCK) {
         PAL_STREAM_ATTR attr;
 
-        if (!DkStreamAttributesQuerybyHandle(accepted, &attr)) {
+        if (!DkStreamAttributesQueryByHandle(accepted, &attr)) {
             ret = -PAL_ERRNO;
             goto out;
         }
 
         attr.nonblocking = PAL_TRUE;
 
-        if (!DkStreamAttributesSetbyHandle(accepted, &attr)) {
+        if (!DkStreamAttributesSetByHandle(accepted, &attr)) {
             ret = -PAL_ERRNO;
             goto out;
         }
@@ -1559,7 +1559,7 @@ query:
     if (!attr) {
         attr = __alloca(sizeof(PAL_STREAM_ATTR));
 
-        if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, attr))
+        if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, attr))
             return -PAL_ERRNO;
     }
 
@@ -1629,7 +1629,7 @@ query:
     return 0;
 
 set:
-    if (!DkStreamAttributesSetbyHandle(hdl->pal_handle, attr))
+    if (!DkStreamAttributesSetByHandle(hdl->pal_handle, attr))
         return -PAL_ERRNO;
 
     return 0;
@@ -1644,7 +1644,7 @@ static int __process_pending_options (struct shim_handle * hdl)
 
     PAL_STREAM_ATTR attr;
 
-    if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr))
+    if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr))
         return -PAL_ERRNO;
 
     struct shim_sock_option * o = sock->pending_options;
@@ -1795,7 +1795,7 @@ query:
     {
         PAL_STREAM_ATTR attr;
 
-        if (!DkStreamAttributesQuerybyHandle(hdl->pal_handle, &attr)) {
+        if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr)) {
             ret = -PAL_ERRNO;
             goto out;
         }

+ 2 - 2
Pal/regression/00_Symbols.py

@@ -24,8 +24,8 @@ all_symbols = [
     'DkSendHandle',
     'DkReceiveHandle',
     'DkStreamAttributesQuery',
-    'DkStreamAttributesQuerybyHandle',
-    'DkStreamAttributesSetbyHandle',
+    'DkStreamAttributesQueryByHandle',
+    'DkStreamAttributesSetByHandle',
     'DkStreamGetName',
     'DkStreamChangeName',
     'DkThreadCreate',

+ 1 - 1
Pal/regression/Directory.c

@@ -15,7 +15,7 @@ int main (int argc, char ** argv, char ** envp)
         pal_printf("Directory Open Test 1 OK\n");
 
         PAL_STREAM_ATTR attr1;
-        if (DkStreamAttributesQuerybyHandle(dir1, &attr1))
+        if (DkStreamAttributesQueryByHandle(dir1, &attr1))
             pal_printf("Query by Handle: type = %d\n", attr1.handle_type);
 
         char buffer[80];

+ 1 - 1
Pal/regression/File.c

@@ -56,7 +56,7 @@ int main (int argc, char ** argv, char ** envp)
         /* test file attribute query */
 
         PAL_STREAM_ATTR attr1;
-        if (DkStreamAttributesQuerybyHandle(file1, &attr1))
+        if (DkStreamAttributesQueryByHandle(file1, &attr1))
             pal_printf("Query by Handle: type = %d, size = %ld\n",
                        attr1.handle_type, attr1.pending_size);
 

+ 1 - 1
Pal/regression/Pipe.c

@@ -18,7 +18,7 @@ int main (int argc, char ** argv, char ** envp)
 
         // DEP 10/24/16: Try to read some attributes of the pipe
         PAL_STREAM_ATTR attr;
-        if (!DkStreamAttributesQuerybyHandle(pipe1, &attr)) {
+        if (!DkStreamAttributesQueryByHandle(pipe1, &attr)) {
             pal_printf("Failed to get any attributes from the pipesrv\n");
             return -1;
         } else 

+ 2 - 2
Pal/regression/Symbols.c

@@ -34,8 +34,8 @@ int main (int argc, char ** argv, char ** envp)
     print_symbol(DkSendHandle);
     print_symbol(DkReceiveHandle);
     print_symbol(DkStreamAttributesQuery);
-    print_symbol(DkStreamAttributesQuerybyHandle);
-    print_symbol(DkStreamAttributesSetbyHandle);
+    print_symbol(DkStreamAttributesQueryByHandle);
+    print_symbol(DkStreamAttributesSetByHandle);
     print_symbol(DkStreamGetName);
     print_symbol(DkStreamChangeName);
 

+ 1 - 1
Pal/src/db_main.c

@@ -317,7 +317,7 @@ has_manifest:
 #endif
 
         PAL_STREAM_ATTR attr;
-        ret = _DkStreamAttributesQuerybyHandle(manifest_handle, &attr);
+        ret = _DkStreamAttributesQueryByHandle(manifest_handle, &attr);
         if (ret < 0)
             init_fail(-ret, "cannot open manifest file");
 

+ 10 - 10
Pal/src/db_streams.c

@@ -419,9 +419,9 @@ DkStreamAttributesQuery (PAL_STR uri, PAL_STREAM_ATTR * attr)
     LEAVE_PAL_CALL_RETURN(PAL_TRUE);
 }
 
-/* _DkStreamAttributesQuerybyHandle for internal use. Query attribute
+/* _DkStreamAttributesQueryByHandle for internal use. Query attribute
    of streams by their handle */
-int _DkStreamAttributesQuerybyHandle (PAL_HANDLE hdl, PAL_STREAM_ATTR * attr)
+int _DkStreamAttributesQueryByHandle (PAL_HANDLE hdl, PAL_STREAM_ATTR * attr)
 {
     if (UNKNOWN_HANDLE(hdl))
         return -PAL_ERROR_BADHANDLE;
@@ -437,20 +437,20 @@ int _DkStreamAttributesQuerybyHandle (PAL_HANDLE hdl, PAL_STREAM_ATTR * attr)
     return ops->attrquerybyhdl(hdl, attr);
 }
 
-/* PAL call DkStreamAttributesQuerybyHandle: Query attribute of a stream by
+/* PAL call DkStreamAttributesQueryByHandle: Query attribute of a stream by
    its handle, attr is memory given by user space. Return the pointer of attr
    if succeeded, or NULL if failed. Error code is notified */
 PAL_BOL
-DkStreamAttributesQuerybyHandle (PAL_HANDLE handle, PAL_STREAM_ATTR * attr)
+DkStreamAttributesQueryByHandle (PAL_HANDLE handle, PAL_STREAM_ATTR * attr)
 {
-    ENTER_PAL_CALL(DkStreamAttributesQuerybyHandle);
+    ENTER_PAL_CALL(DkStreamAttributesQueryByHandle);
 
     if (!handle || !attr) {
         _DkRaiseFailure(PAL_ERROR_INVAL);
         LEAVE_PAL_CALL_RETURN(PAL_FALSE);
     }
 
-    int ret = _DkStreamAttributesQuerybyHandle(handle, attr);
+    int ret = _DkStreamAttributesQueryByHandle(handle, attr);
 
     if (ret < 0) {
         _DkRaiseFailure(-ret);
@@ -460,13 +460,13 @@ DkStreamAttributesQuerybyHandle (PAL_HANDLE handle, PAL_STREAM_ATTR * attr)
     LEAVE_PAL_CALL_RETURN(PAL_TRUE);
 }
 
-/* PAL call DkStreamAttributesSetbyHandle: Set attribute of a stream by
+/* PAL call DkStreamAttributesSetByHandle: Set attribute of a stream by
    its handle, attr is memory given by user space. Return the pointer of attr
    if succeeded, or NULL if failed. Error code is notified */
 PAL_BOL
-DkStreamAttributesSetbyHandle (PAL_HANDLE handle, PAL_STREAM_ATTR * attr)
+DkStreamAttributesSetByHandle (PAL_HANDLE handle, PAL_STREAM_ATTR * attr)
 {
-    ENTER_PAL_CALL(DkStreamAttributesSetbyHandle);
+    ENTER_PAL_CALL(DkStreamAttributesSetByHandle);
 
     if (!handle || !attr) {
         _DkRaiseFailure(PAL_ERROR_INVAL);
@@ -515,7 +515,7 @@ int _DkStreamGetName (PAL_HANDLE handle, char * buffer, int size)
     return ret;
 }
 
-/* PAL call DkStreamAttributesSetbyHandle: Set attribute of a stream by
+/* PAL call DkStreamAttributesSetByHandle: Set attribute of a stream by
    its handle, attr is memory given by user space. Return the pointer of attr
    if succeeded, or NULL if failed. Error code is notified */
 PAL_NUM DkStreamGetName (PAL_HANDLE handle, PAL_PTR buffer, PAL_NUM size)

+ 2 - 2
Pal/src/host/FreeBSD/pal.map

@@ -17,7 +17,7 @@ PAL {
         DkSendHandle; DkReceiveHandle; # Added by us
         DkStreamWaitForClient;
         DkStreamGetName;
-        DkStreamAttributesQuerybyHandle; DkStreamAttributesQuery;
+        DkStreamAttributesQueryByHandle; DkStreamAttributesQuery;
 
         DkProcessCreate; DkProcessExit;
 
@@ -36,7 +36,7 @@ PAL {
         DkPhysicalMemoryMap; # IPC
         DkSegmentRegister; # set segmentation registers
         DkStreamChangeName;
-        DkStreamAttributesSetbyHandle;
+        DkStreamAttributesSetByHandle;
         DkMemoryAvailableQuota;
 
         # Debugging ABIs

+ 2 - 2
Pal/src/host/Linux-SGX/pal.map

@@ -17,7 +17,7 @@ PAL {
         DkSendHandle; DkReceiveHandle; # Added by us
         DkStreamWaitForClient;
         DkStreamGetName;
-        DkStreamAttributesQuerybyHandle; DkStreamAttributesQuery;
+        DkStreamAttributesQueryByHandle; DkStreamAttributesQuery;
 
         DkProcessCreate; DkProcessExit;
 
@@ -38,7 +38,7 @@ PAL {
         DkThreadPrivateSet; DkThreadPrivateGet; # set/get thread private area
         DkThreadGetCurrent; # get a handle to describe the current thread
         DkStreamChangeName;
-        DkStreamAttributesSetbyHandle;
+        DkStreamAttributesSetByHandle;
         DkSegmentRegister; # set segment register
         DkMemoryAvailableQuota;
         DkCpuIdRetrieve; # retrieve CPUID

+ 1 - 1
Pal/src/host/Linux/db_process.c

@@ -445,7 +445,7 @@ static int set_graphene_task (const char * uri, int flags)
 
     PAL_STREAM_ATTR attr;
 
-    if ((ret = _DkStreamAttributesQuerybyHandle(handle, &attr)) < 0)
+    if ((ret = _DkStreamAttributesQueryByHandle(handle, &attr)) < 0)
         goto out;
 
     void * addr = NULL;

+ 2 - 2
Pal/src/host/Linux/pal.map

@@ -17,7 +17,7 @@ PAL {
         DkSendHandle; DkReceiveHandle; # Added by us
         DkStreamWaitForClient;
         DkStreamGetName;
-        DkStreamAttributesQuerybyHandle; DkStreamAttributesQuery;
+        DkStreamAttributesQueryByHandle; DkStreamAttributesQuery;
 
         DkProcessCreate; DkProcessExit;
 
@@ -37,7 +37,7 @@ PAL {
         DkPhysicalMemoryMap; # IPC
         DkSegmentRegister; # set segmentation registers
         DkStreamChangeName;
-        DkStreamAttributesSetbyHandle;
+        DkStreamAttributesSetByHandle;
         DkMemoryAvailableQuota;
 
         # Debugging ABIs

+ 2 - 2
Pal/src/host/Skeleton/pal.map

@@ -17,7 +17,7 @@ PAL {
         DkSendHandle; DkReceiveHandle; # Added by us
         DkStreamWaitForClient;
         DkStreamGetName;
-        DkStreamAttributesQuerybyHandle; DkStreamAttributesQuery;
+        DkStreamAttributesQueryByHandle; DkStreamAttributesQuery;
 
         DkProcessCreate; DkProcessExit;
 
@@ -36,7 +36,7 @@ PAL {
         DkPhysicalMemoryMap; # IPC
         DkSegmentRegister; # set segmentation registers
         DkStreamChangeName;
-        DkStreamAttributesSetbyHandle;
+        DkStreamAttributesSetByHandle;
         DkMemoryAvailableQuota;
 
         # Debugging ABIs

+ 2 - 2
Pal/src/pal.h

@@ -368,11 +368,11 @@ PAL_BOL
 DkStreamAttributesQuery (PAL_STR uri, PAL_STREAM_ATTR * attr);
 
 PAL_BOL
-DkStreamAttributesQuerybyHandle (PAL_HANDLE handle,
+DkStreamAttributesQueryByHandle (PAL_HANDLE handle,
                                  PAL_STREAM_ATTR * attr);
 
 PAL_BOL
-DkStreamAttributesSetbyHandle (PAL_HANDLE handle, PAL_STREAM_ATTR * attr);
+DkStreamAttributesSetByHandle (PAL_HANDLE handle, PAL_STREAM_ATTR * attr);
 
 PAL_NUM
 DkStreamGetName (PAL_HANDLE handle, PAL_PTR buffer, PAL_NUM size);

+ 3 - 3
Pal/src/pal_internal.h

@@ -104,11 +104,11 @@ struct handle_ops {
     int (*attrquery) (const char * type, const char * uri,
                       PAL_STREAM_ATTR * attr);
 
-    /* 'attrquerybyhdl' is used by DkStreamAttributesQuerybyHandle. It queries
+    /* 'attrquerybyhdl' is used by DkStreamAttributesQueryByHandle. It queries
        the attributes of a stream handle */
     int (*attrquerybyhdl) (PAL_HANDLE handle, PAL_STREAM_ATTR * attr);
 
-    /* 'attrsetbyhdl' is used by DkStreamAttributesSetbyHandle. It queries
+    /* 'attrsetbyhdl' is used by DkStreamAttributesSetByHandle. It queries
        the attributes of a stream handle */
     int (*attrsetbyhdl) (PAL_HANDLE handle, PAL_STREAM_ATTR * attr);
 
@@ -284,7 +284,7 @@ int64_t _DkStreamRead (PAL_HANDLE handle, uint64_t offset, uint64_t count,
 int64_t _DkStreamWrite (PAL_HANDLE handle, uint64_t offset, uint64_t count,
                         const void * buf, const char * addr, int addrlen);
 int _DkStreamAttributesQuery (const char * uri, PAL_STREAM_ATTR * attr);
-int _DkStreamAttributesQuerybyHandle (PAL_HANDLE hdl, PAL_STREAM_ATTR * attr);
+int _DkStreamAttributesQueryByHandle (PAL_HANDLE hdl, PAL_STREAM_ATTR * attr);
 int _DkStreamMap (PAL_HANDLE handle, void ** addr, int prot, uint64_t offset,
                   uint64_t size);
 int _DkStreamUnmap (void * addr, uint64_t size);