search for: align_num

Displaying 1 result from an estimated 1 matches for "align_num".

2006 Oct 15
3
open(2) O_DIRECT on smbmount gives EINVAL
....6.9-42.0.3.EL (32-bit) I am using the below code for my test. smb fails on open(2). #include <fcntl.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <stdint.h> #define SECTORSIZE 512 #define ALIGN_NUM(val, mult) (((val) + ((mult) - 1)) & ~(((mult) - 1))) #define ALIGN_PTR(ptr, mult) (void *)ALIGN_NUM((uintptr_t)(ptr), mult) #define DECL_ALIGNED_BUFFER(name, size) \ char __##name[(size) + SECTORSIZE]; \ char *name = (char *)ALIGN_PTR(__##name, SECTORSIZE) #define TEST_FILE "test....