Changeset 988 for vendor/current/examples/libsmbclient/testsmbc.c
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/examples/libsmbclient/testsmbc.c
r414 r988 30 30 #include "get_auth_data_fn.h" 31 31 32 int global_id = 0;33 34 void print_list_fn(struct print_job_info *pji)35 {36 37 fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %lu, User: %s, Name: %s\n",38 pji->id,39 pji->priority,40 (unsigned long) pji->size,41 pji->user,42 pji->name);43 44 global_id = pji->id;45 46 }47 48 32 int main(int argc, char *argv[]) 49 33 { 50 int err, fd, dh1, d h2, dh3, dsize, dirc;34 int err, fd, dh1, dsize, dirc; 51 35 const char *file = "smb://samba/public/testfile.txt"; 52 36 const char *file2 = "smb://samba/public/testfile2.txt"; … … 75 59 } 76 60 77 fprintf(stdout, "Directory handle s: %u, %u, %u\n", dh1, dh2, dh3);61 fprintf(stdout, "Directory handle: %u\n", dh1); 78 62 79 63 /* Now, list those directories, but in funny ways ... */ … … 131 115 /* Now, write some date to the file ... */ 132 116 133 bzero(buff, sizeof(buff));117 memset(buff, '\0', sizeof(buff)); 134 118 strcpy(buff, "Some test data for the moment ..."); 135 119 … … 257 241 258 242 fprintf(stdout, "Stat'ed file: %s. Size = %d, mode = %04X\n", file2, 259 (int)st2.st_size, st2.st_mode);243 (int)st2.st_size, (unsigned int)st2.st_mode); 260 244 fprintf(stdout, " time: %s\n", ctime(&st2.st_atime)); 261 245 fprintf(stdout, "Earlier stat: %s, Size = %d, mode = %04X\n", file, 262 (int)st1.st_size, st1.st_mode);246 (int)st1.st_size, (unsigned int)st1.st_mode); 263 247 fprintf(stdout, " time: %s\n", ctime(&st1.st_atime)); 264 248
Note:
See TracChangeset
for help on using the changeset viewer.