Check-in [52b0c9265b]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:52b0c9265bd268e55e98cb17885144815f8cb69f
Date: 2009-06-14 14:38:07
User: stephan
Comment:fixed a typo
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to whefs_cache.c

Old (1fb3bae6f6720773) New (d2e886ce8d7ef365)
1 /** 1 /**
2 Author: Stephan Beal (http://wanderinghorse.net/home/stephan/ 2 Author: Stephan Beal (http://wanderinghorse.net/home/stephan/
3 3
4 License: Public Domain 4 License: Public Domain
5 5
66 hidden lines
72 assert( 0 && "whio_dev_ioctl_GENERAL_size not behaving as documented!" ); 72 assert( 0 && "whio_dev_ioctl_GENERAL_size not behaving as documented!" );
73 return 0; 73 return 0;
74 } 74 }
75 msize += sizeof(whefs_string_db) 75 msize += sizeof(whefs_string_db)
76 + sizeof(*(db->devMem)) 76 + sizeof(*(db->devMem))
77 // we don't know the undernal costs | 77 // we don't know the underlying internal costs of db->devMem, other than msize.
78 ; 78 ;
79 return msize; 79 return msize;
80 } 80 }
81 int whefs_string_db_set( whefs_string_db * db, whefs_id_type id, char const * str ) 81 int whefs_string_db_set( whefs_string_db * db, whefs_id_type id, char const * str )
82 { 82 {
29 hidden lines
112 #elseif 0 112 #elseif 0
113 static char const * empty = ""; 113 static char const * empty = "";
114 #else 114 #else
115 static char const * empty = 0; 115 static char const * empty = 0;
116 #endif 116 #endif
117 <
118 if( ! db ) return 0; 117 if( ! db ) return 0;
119 if( ! whio_blockdev_in_range( db ? &db->devBlock : 0, id ) ) return 0; 118 if( ! whio_blockdev_in_range( db ? &db->devBlock : 0, id ) ) return 0;
> 119
120 120
121 whio_size_t msize = (whio_size_t)-1; 121 whio_size_t msize = (whio_size_t)-1;
122 whio_dev_ioctl( db->devMem, whio_dev_ioctl_GENERAL_size, &msize ); 122 whio_dev_ioctl( db->devMem, whio_dev_ioctl_GENERAL_size, &msize );
123 if( (whio_size_t)-1 == msize ) 123 if( (whio_size_t)-1 == msize )
124 { 124 {
193 hidden lines
318 H.id = id; 318 H.id = id;
319 rc = whefs_hashid_list_add( fs->cache.hashes, &H ); 319 rc = whefs_hashid_list_add( fs->cache.hashes, &H );
320 if(0) WHEFS_DBG("Added to name cache: hash[%"WHEFS_HASHVAL_TYPE_PFMT"]=id[%"WHEFS_ID_TYPE_PFMT"], name=[%s], rc=%d", H.hash, H.id, name, rc ); 320 if(0) WHEFS_DBG("Added to name cache: hash[%"WHEFS_HASHVAL_TYPE_PFMT"]=id[%"WHEFS_ID_TYPE_PFMT"], name=[%s], rc=%d", H.hash, H.id, name, rc );
321 return whefs_rc.OK; 321 return whefs_rc.OK;
322 } 322 }