ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/extfs_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/extfs_unix.cpp (file contents):
Revision 1.10 by cebix, 1999-12-22T16:16:16Z vs.
Revision 1.11 by cebix, 2000-01-21T13:47:04Z

# Line 85 | Line 85 | struct finf_struct {
85          uint32 type;
86          uint32 creator;
87          uint16 flags;
88 <        uint16 pad0;
88 >        uint8 pad0[22]; // total size: 32 bytes to match the size of FInfo+FXInfo
89   };
90  
91   static void make_helper_path(const char *src, char *dest, const char *add, bool only_dir = false)
# Line 226 | Line 226 | void get_finder_type(const char *path, u
226  
227                  // Read file
228                  finf_struct finf;
229 <                if (read(fd, &finf, sizeof(finf_struct)) == sizeof(finf_struct)) {
229 >                if (read(fd, &finf, sizeof(finf_struct)) >= 8) {
230  
231                          // Type/creator are in Finder info file, return them
232                          type = ntohl(finf.type);
# Line 259 | Line 259 | void set_finder_type(const char *path, u
259                  return;
260  
261          // Read file
262 <        finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS, 0};
262 >        finf_struct finf;
263 >        finf.flags = DEFAULT_FINDER_FLAGS;
264 >        memset(&finf, 0, sizeof(finf_struct));
265          read(fd, &finf, sizeof(finf_struct));
266  
267          // Set Finder flags
# Line 288 | Line 290 | void get_finder_flags(const char *path,
290  
291          // Read Finder flags
292          finf_struct finf;
293 <        if (read(fd, &finf, sizeof(finf_struct)) == sizeof(finf_struct))
293 >        if (read(fd, &finf, sizeof(finf_struct)) >= 10)
294                  flags = ntohs(finf.flags);
295  
296          // Close file
# Line 303 | Line 305 | void set_finder_flags(const char *path,
305                  return;
306  
307          // Read file
308 <        finf_struct finf = {0, 0, DEFAULT_FINDER_FLAGS, 0};
308 >        finf_struct finf;
309 >        memset(&finf, 0, sizeof(finf_struct));
310 >        finf.flags = DEFAULT_FINDER_FLAGS;
311          read(fd, &finf, sizeof(finf_struct));
312  
313          // Set Finder flags

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines