Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/plugins


Modified Files:
        evfs_fs_posix.c evfs_fs_samba.c evfs_fs_tar.c 


Log Message:
* Work on evfs_operation for user/server comms on tasks

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_posix.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- evfs_fs_posix.c     18 Jan 2006 10:31:22 -0000      1.29
+++ evfs_fs_posix.c     26 Jan 2006 03:33:48 -0000      1.30
@@ -50,8 +50,8 @@
        int evfs_monitor_stop(evfs_client* client, evfs_command* command);
        int evfs_file_open(evfs_client* client, evfs_filereference* file);
        int evfs_file_close(evfs_filereference* file);
-       int evfs_file_stat(evfs_command* command, struct stat* file_stat);
-       int evfs_file_lstat(evfs_command* command, struct stat* file_stat);
+       int evfs_file_stat(evfs_command* command, struct stat* file_stat, int);
+       int evfs_file_lstat(evfs_command* command, struct stat* file_stat, int);
        int evfs_file_seek(evfs_filereference* file, long offset, int whence);
        int evfs_file_read(evfs_client* client, evfs_filereference* file, char* 
bytes, long size);
        int evfs_file_write(evfs_filereference* file, char* bytes, long size);
@@ -345,17 +345,26 @@
 }
 
 
-int evfs_file_stat(evfs_command* command, struct stat* file_stat) {
+int evfs_file_stat(evfs_command* command, struct stat* file_stat, int 
file_number) {
        //printf("Getting file stat...\n");
-       stat(command->file_command.files[0]->path, file_stat);
-       //printf("File size: %d\n", file_stat->st_size);
+       int res = stat(command->file_command.files[file_number]->path, 
file_stat);
+       if (!res) 
+               return EVFS_SUCCESS;
+       else
+               return EVFS_ERROR;
 }
 
 
-int evfs_file_lstat(evfs_command* command, struct stat* file_stat) {
+int evfs_file_lstat(evfs_command* command, struct stat* file_stat, int 
file_number) {
        //printf("Getting file stat...\n");
-       lstat(command->file_command.files[0]->path, file_stat);
+       int res = lstat(command->file_command.files[file_number]->path, 
file_stat);
        //printf("File size: %d\n", file_stat->st_size);
+       //
+       if (!res) 
+               return EVFS_SUCCESS;
+       else
+               return EVFS_ERROR;
+
 }
 
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_samba.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- evfs_fs_samba.c     2 Jan 2006 23:40:05 -0000       1.27
+++ evfs_fs_samba.c     26 Jan 2006 03:33:48 -0000      1.28
@@ -52,7 +52,7 @@
 
 
 static void smb_evfs_dir_list(evfs_client* client, evfs_command* command, 
Ecore_List** directory_list);
-int smb_evfs_file_stat(evfs_command* command, struct stat* file_stat);
+int smb_evfs_file_stat(evfs_command* command, struct stat* file_stat, int);
 int evfs_file_open(evfs_client* client, evfs_filereference* file);
 int evfs_file_close(evfs_filereference* file);
 int evfs_file_seek(evfs_filereference* file, long offset, int whence);
@@ -218,7 +218,7 @@
        return "smb";
 }
 
-int smb_evfs_file_stat(evfs_command* command, struct stat* file_stat) {
+int smb_evfs_file_stat(evfs_command* command, struct stat* file_stat, int 
number) {
        
        int err = 0;
        int fd = 0;
@@ -230,19 +230,19 @@
        /*Does this command have an attached authentication object?*/
        if (command->file_command.files[0]->username) {
                printf("We have a username, adding to hash..\n");
-               evfs_auth_structure_add(auth_cache,  
command->file_command.files[0]->username, 
-                               command->file_command.files[0]->password, 
command->file_command.files[0]->path);
+               evfs_auth_structure_add(auth_cache,  
command->file_command.files[number]->username, 
+                               command->file_command.files[number]->password, 
command->file_command.files[number]->path);
        }
        
        
-       sprintf(dir,"smb:/%s", command->file_command.files[0]->path);
-       printf("Getting stat on file '%s'\n", dir);
+       sprintf(dir,"smb:/%s", command->file_command.files[number]->path);
+       //printf("Getting stat on file '%s'\n", dir);
 
        err = smb_context->stat(smb_context, (const char*)dir, &smb_stat);
-       printf("Returned error code: %d\n", err);
-       printf("File size: %ld\n", file_stat->st_size);
+       //printf("Returned error code: %d\n", err);
+       //printf("File size: %ld\n", file_stat->st_size);
        
-       printf("Returning to caller..\n");
+       //printf("Returning to caller..\n");
 
        /*Ugly as shit - but if libsmbclient is compiled
         * with a different mem packing regime, then
@@ -262,9 +262,10 @@
        file_stat->st_mtime = smb_stat.st_mtime;
        file_stat->st_ctime = smb_stat.st_ctime;
 
-
-       return 0;
-
+       if (!err) 
+               return EVFS_SUCCESS;
+       else
+               return EVFS_ERROR;
 }
 
 static void smb_evfs_dir_list(evfs_client* client, evfs_command* command,
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/plugins/evfs_fs_tar.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- evfs_fs_tar.c       2 Jan 2006 08:55:51 -0000       1.15
+++ evfs_fs_tar.c       26 Jan 2006 03:33:48 -0000      1.16
@@ -82,7 +82,7 @@
 int evfs_monitor_stop(evfs_client* client, evfs_command* command);
 int evfs_file_open(evfs_client* client, evfs_filereference* file);
 int evfs_file_close(evfs_filereference* file);
-int evfs_file_stat(evfs_command* command, struct stat* file_stat);
+int evfs_file_stat(evfs_command* command, struct stat* file_stat, int);
 int evfs_file_seek(evfs_filereference* file, long offset, int whence);
 int evfs_file_read(evfs_filereference* file, char* bytes, long size);
 int evfs_file_write(evfs_filereference* file, char* bytes, long size);
@@ -472,24 +472,24 @@
 }
 
 
-int evfs_file_stat(evfs_command* command, struct stat* file_stat) {
+int evfs_file_stat(evfs_command* command, struct stat* file_stat, int number) {
        struct tar_file* file;
        struct tar_element* ele;
 
-       printf("Looking for file '%s'\n", 
evfs_file_top_level_find(command->file_command.files[0])->path);
-       if (!(file = ecore_hash_get(tar_cache, 
evfs_file_top_level_find(command->file_command.files[0])->path))) {
+       printf("Looking for file '%s'\n", 
evfs_file_top_level_find(command->file_command.files[number])->path);
+       if (!(file = ecore_hash_get(tar_cache, 
evfs_file_top_level_find(command->file_command.files[number])->path))) {
                printf("Could not find file in lookup ref\n");
                
                
        } else {
                printf("located tar file in cache");
-               ele = ecore_hash_get(file->link_in, 
command->file_command.files[0]->path );
+               ele = ecore_hash_get(file->link_in, 
command->file_command.files[number]->path );
 
                if (ele) {
                        memcpy(file_stat, &ele->file_prop, sizeof(struct stat));
                        
                } else {
-                       printf("Couldn't locate file '%s' in tar file\n", 
command->file_command.files[0]->path);
+                       printf("Couldn't locate file '%s' in tar file\n", 
command->file_command.files[number]->path);
                }
        }
                




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to