*
* finds exact match if one exists, and returns BEFS_BT_MATCH
* If no exact match, finds first key in node that is greater
- * (alpabeticly) than the search key and returns BEFS_BT_PARMATCH
+ * (alphabetically) than the search key and returns BEFS_BT_PARMATCH
* (for partial match, I guess). Can you think of something better to
* call it?
*
* @value: Value stored with the returned key
*
* Heres how it works: Key_no is the index of the key/value pair to
- * retun in keybuf/value.
+ * return in keybuf/value.
* Bufsize is the size of keybuf (BEFS_NAME_LEN+1 is a good size). Keysize is
- * the number of charecters in the key (just a convience).
+ * the number of charecters in the key (just a convenience).
*
* Algorithm:
* Get the first leafnode of the tree. See if the requested key is in that
* befs_btree_seekleaf - Find the first leafnode in the btree
* @sb: Filesystem superblock
* @ds: Datastream containing btree
- * @bt_super: Pointer to the uperblock of the btree
+ * @bt_super: Pointer to the superblock of the btree
* @this_node: Buffer to return the leafnode in
* @node_off: Pointer to offset of current node within datastream. Modified
* by the function.
* of the B+tree node *@node
*
* "The length of all the keys in the node is added to the size of the
- * header and then rounded up to a multiple of four to get the begining
+ * header and then rounded up to a multiple of four to get the beginning
* of the key length index" (p.88, practical filesystem design).
*
- * Exept that rounding up to 8 works, and rounding up to 4 doesn't.
+ * Except that rounding up to 8 works, and rounding up to 4 doesn't.
*/
static u16 *
befs_bt_keylen_index(befs_btree_node * node)
* @key1: pointer to the first key to be compared
* @keylen1: length in bytes of key1
* @key2: pointer to the second key to be compared
- * @kelen2: lenght in bytes of key2
+ * @kelen2: length in bytes of key2
*
* Returns 0 if @key1 and @key2 are equal.
* Returns >0 if @key1 is greater.
/*
* set uid and gid. But since current BeOS is single user OS, so
* you can change by "uid" or "gid" options.
- */
+ */
inode->i_uid = befs_sb->mount_opts.use_uid ?
befs_sb->mount_opts.uid : (uid_t) fs32_to_cpu(sb, raw_inode->uid);
* BEFS's time is 64 bits, but current VFS is 32 bits...
* BEFS don't have access time. Nor inode change time. VFS
* doesn't have creation time.
+ * Also, the lower 16 bits of the last_modified_time and
+ * create_time are just a counter to help ensure uniqueness
+ * for indexing purposes. (PFD, page 54)
*/
inode->i_mtime.tv_sec =
fs64_to_cpu(sb, raw_inode->last_modified_time) >> 16;
- inode->i_mtime.tv_nsec = 0; /* use the lower bits ? */
+ inode->i_mtime.tv_nsec = 0; /* lower 16 bits are not a time */
inode->i_ctime = inode->i_mtime;
inode->i_atime = inode->i_mtime;
inode->i_blksize = befs_sb->block_size;
/*
* UTF-8 to NLS charset convert routine
+ *
*
* Changed 8/10/01 by Will Dyson. Now use uni2char() / char2uni() rather than
* the nls tables directly
}
}
result[o] = '\0';
+ *out_len = o;
befs_debug(sb, "<--- utf2nls()");
return o;
- *out_len = o;
conv_err:
befs_error(sb, "Name using charecter set %s contains a charecter that "
*
* On return, *@destlen is the length of @dest in bytes.
*
- * On success, the return value is the number of utf8 charecters written to
- * the ouput buffer @dest.
+ * On success, the return value is the number of utf8 characters written to
+ * the output buffer @dest.
*
* On Failure, a negative number coresponding to the error code is returned.
*/