Thanks Patrick!! The fix does indeed work!

So, a better fix to the problem would be to leave
smb3.c as it originally was, and to modify the type
definition of smb_tran2QFSInfo_t in smb3.h. Note the
addition of the 2 lines that start with the "#prama"
directive.

typedef struct smb_tran2QFSInfo {
        union {
#pragma pack(push, 2)
                struct {
                        long FSID;                      /* file system ID */
                        long sectorsPerAllocUnit;
            long totalAllocUnits;               /* on the disk */
            long availAllocUnits;               /* free blocks */
            unsigned short bytesPerSector;      /* bytes
per sector */
                } allocInfo;
#pragma pack(pop)
        struct {
                        long vsn;       /* volume serial number */
            char vnCount;       /* count of chars in label,
incl null */
            char label[12];     /* pad out with nulls */
        } volumeInfo;
                struct {
                        FILETIME vct;   /* volume creation time */
                        long vsn;       /* volume serial number */
                        long vnCount;   /* length of volume label in bytes */
                        char res[2];    /* reserved */
                        char label[10]; /* volume label */
                } FSvolumeInfo;
                struct {
                        osi_hyper_t totalAllocUnits;    /* on the disk */
                        osi_hyper_t availAllocUnits;    /* free blocks */
                        long sectorsPerAllocUnit;
                        long bytesPerSector;            /* bytes per sector */
                } FSsizeInfo;
                struct {
                        long devType;   /* device type */
                        long characteristics;
                } FSdeviceInfo;
                struct {
                        long attributes;
                        long maxCompLength;     /* max path component length */
                        long FSnameLength;      /* length of file system name */
                        char FSname[12];
                } FSattributeInfo;
        } u;
} smb_tran2QFSInfo_t;

--- "Patrick J. LoPresti" <[EMAIL PROTECTED]> wrote:
> Our local Visual C wizard suggests:
> 
>     #pragma pack(push, 2)
>     struct myStruct { 
>       int a;
>       short b;
>     };
>     #pragma pack(pop)
> 
>     void main() {
>       struct myStruct foo;
>       printf("size of foo is %d\n", sizeof(foo));
>     }
> 
> 
>  - Pat
> _______________________________________________
> OpenAFS-devel mailing list
> [EMAIL PROTECTED]
>
https://lists.openafs.org/mailman/listinfo/openafs-devel


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
_______________________________________________
OpenAFS-devel mailing list
[EMAIL PROTECTED]
https://lists.openafs.org/mailman/listinfo/openafs-devel

Reply via email to