Lines Matching refs:buffer

161 		 * specify a preallocated buffer while libntfs-3g's always
162 * allocates the output buffer.
454 * has been created without an inode, it won't overflow the buffer.
478 * @mft: A buffer containing a raw MFT record
484 * the buffer, since we created the search context without an inode.
525 int utils_inode_get_name(ntfs_inode *inode, char *buffer, int bufsize)
540 if (!inode || !buffer) {
622 len = snprintf(buffer + offset, bufsize - offset, "%c%s", PATH_SEP, names[i]);
635 ntfs_log_debug("Pathname: %s\n", buffer);
644 int utils_attr_get_name(ntfs_volume *vol, ATTR_RECORD *attr, char *buffer, int bufsize)
651 if (!attr || !buffer) {
666 len = snprintf(buffer, bufsize, "%s", name);
669 len = snprintf(buffer, bufsize, "<UNKNOWN>");
681 buffer += len;
692 len = snprintf(buffer, bufsize, "<UNKNOWN>");
696 len = snprintf(buffer, bufsize, "(%s)", name);
714 * reads the relevant part of $Bitmap into a buffer and tests the bit.
716 * This function has a static buffer in which it caches a section of $Bitmap.
717 * If the lcn, being tested, lies outside the range, the buffer will be
719 * buffer.
729 static unsigned char buffer[512];
730 static long long bmplcn = -(sizeof(buffer) << 3);
741 || (lcn >= (long long)(bmplcn + (sizeof(buffer) << 3)))) {
749 /* Mark the buffer as in use, in case the read is shorter. */
750 memset(buffer, 0xFF, sizeof(buffer));
751 bmplcn = lcn & (~((sizeof(buffer) << 3) - 1));
753 if (ntfs_attr_pread(attr, (bmplcn >> 3), sizeof(buffer),
754 buffer) < 0) {
760 ntfs_log_debug("Reloaded bitmap buffer.\n");
765 byte = (lcn >> 3) & (sizeof(buffer) - 1);
767 "in use %d\n", lcn, bmplcn, byte, bit, buffer[byte] &
770 return (buffer[byte] & bit);
780 * reads the relevant part of $BITMAP into a buffer and tests the bit.
782 * This function has a static buffer in which it caches a section of $BITMAP.
783 * If the mref, being tested, lies outside the range, the buffer will be
792 static u8 buffer[512];
793 static s64 bmpmref = -(sizeof(buffer) << 3) - 1; /* Which bit of $BITMAP is in the buffer */
805 || ((s64)MREF(mref) >= (s64)(bmpmref + (sizeof(buffer) << 3)))) {
808 /* Mark the buffer as not in use, in case the read is shorter. */
809 memset(buffer, 0, sizeof(buffer));
810 bmpmref = mref & (~((sizeof(buffer) << 3) - 1));
812 if (ntfs_attr_pread(vol->mftbmp_na, (bmpmref>>3), sizeof(buffer), buffer) < 0) {
817 ntfs_log_debug("Reloaded bitmap buffer.\n");
821 byte = (mref >> 3) & (sizeof(buffer) - 1);
824 byte, bit, buffer[byte] & bit);
826 return (buffer[byte] & bit);