#include <afs/param.h>
#include <afs/stds.h>
-#ifndef DJGPP
#include <windows.h>
-#endif /* !DJGPP */
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
smb_ioctlProcsp[VIOC_GETRXKCRYPT] = cm_IoctlGetRxkcrypt;
smb_ioctlProcsp[VIOC_SETRXKCRYPT] = cm_IoctlSetRxkcrypt;
smb_ioctlProcsp[VIOC_ISSYMLINK] = cm_IoctlIslink;
-#ifdef DJGPP
- smb_ioctlProcsp[VIOC_SHUTDOWN] = cm_IoctlShutdown;
-#endif
smb_ioctlProcsp[VIOC_TRACEMEMDUMP] = cm_IoctlMemoryDump;
smb_ioctlProcsp[VIOC_ISSYMLINK] = cm_IoctlIslink;
smb_ioctlProcsp[VIOC_FLUSHALL] = cm_IoctlFlushAllVolumes;
smb_ioctlProcsp[VIOCGETOWNER] = cm_IoctlGetOwner;
smb_ioctlProcsp[VIOC_RXSTAT_PROC] = cm_IoctlRxStatProcess;
smb_ioctlProcsp[VIOC_RXSTAT_PEER] = cm_IoctlRxStatPeer;
+ smb_ioctlProcsp[VIOC_UUIDCTL] = cm_IoctlUUIDControl;
+ smb_ioctlProcsp[VIOC_PATH_AVAILABILITY] = cm_IoctlPathAvailability;
+ smb_ioctlProcsp[VIOC_GETFILETYPE] = cm_IoctlGetFileType;
+ smb_ioctlProcsp[VIOC_VOLSTAT_TEST] = cm_IoctlVolStatTest;
}
/* called to make a fid structure into an IOCTL fid structure */
* this is the first read call. This is the function that actually makes the
* call to the ioctl code.
*/
-smb_IoctlPrepareRead(smb_fid_t *fidp, smb_ioctl_t *ioctlp, cm_user_t *userp)
+long smb_IoctlPrepareRead(smb_fid_t *fidp, smb_ioctl_t *ioctlp, cm_user_t *userp)
{
long opcode;
smb_ioctlProc_t *procp = NULL;
return CM_ERROR_TOOBIG;
/* check for no such proc */
- if (fidp->flags & SMB_FID_IOCTL)
- procp = smb_ioctlProcsp[opcode];
- else
- procp = NULL;
-
+ procp = smb_ioctlProcsp[opcode];
if (procp == NULL)
return CM_ERROR_BADOP;
uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
userp = smb_GetUserFromUID(uidp);
- osi_assert(userp != 0);
+ osi_assertx(userp != NULL, "null cm_user_t");
iop->uidp = uidp;
if (uidp && uidp->unp) {
osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
/* called from Read Raw to handle IOCTL descriptor reads */
long smb_IoctlReadRaw(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
smb_packet_t *outp
-#ifdef DJGPP
- , dos_ptr rawBuf
-#endif /* DJGPP */
)
{
smb_ioctl_t *iop;
NCB *ncbp;
long code;
cm_user_t *userp;
-#ifdef DJGPP
- dos_ptr dos_ncb;
-
- if (rawBuf == 0)
- {
- osi_Log0(afsd_logp, "Failed to get raw buf for smb_IoctlReadRaw");
- return -1;
- }
-#endif /* DJGPP */
iop = fidp->ioctlp;
/*ncbp->ncb_lana_num = smb_LANadapter;*/
ncbp->ncb_lana_num = vcp->lana;
-#ifndef DJGPP
ncbp->ncb_buffer = iop->outCopied + iop->outAllocp;
code = Netbios(ncbp);
-#else /* DJGPP */
- dosmemput(iop->outCopied + iop->outAllocp, ncbp->ncb_length, rawBuf);
- ncbp->ncb_buffer = rawBuf;
- dos_ncb = ((smb_ncb_t *)ncbp)->dos_ncb;
- code = Netbios(ncbp, dos_ncb);
-#endif /* !DJGPP */
if (code != 0)
osi_Log1(afsd_logp, "ReadRaw send failure code %d", code);