- Timestamp:
- Mar 21, 2012 11:18:15 AM (13 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r40533 r40560 213 213 PROGRAMS += tstVBoxGuest-solaris 214 214 tstVBoxGuest-solaris_TEMPLATE = VBOXR3TSTEXE 215 tstVBoxGuest-solaris_SOURCES = VBoxGuest-solaris-streams.c 215 tstVBoxGuest-solaris_SOURCES = \ 216 VBoxGuest-solaris-streams.c \ 217 testcase/tstVBoxGuest-solaris.c 216 218 tstVBoxGuest-solaris_DEFS = TESTCASE 217 219 tstVBoxGuest-solaris_LIBS = $(LIB_RUNTIME) -
trunk/src/VBox/Additions/common/VBoxGuest/testcase/solaris.h
r40552 r40560 352 352 #define putbq(...) do {} while(0) 353 353 354 /* Externally defined helpers. */ 355 356 extern void miocack(queue_t *pWriteQueue, mblk_t *pMBlk, int cbData, int rc); 357 extern void miocnak(queue_t *pWriteQueue, mblk_t *pMBlk, int cbData, int iErr); 358 extern int miocpullup(mblk_t *pMBlk, size_t cbMsg); 359 354 360 /* API stubs with simple logic */ 355 361 … … 385 391 } 386 392 387 static inline void miocack(queue_t *pWriteQueue, mblk_t *pMBlk, int cbData,388 int rc)389 {390 struct iocblk *pIOCBlk = (struct iocblk *)pMBlk->b_rptr;391 392 pMBlk->b_datap->db_type = M_IOCACK;393 pIOCBlk->ioc_count = cbData;394 pIOCBlk->ioc_error = 0;395 pIOCBlk->ioc_rval = rc;396 qreply(pWriteQueue, pMBlk);397 }398 399 static inline void miocnak(queue_t *pWriteQueue, mblk_t *pMBlk, int cbData,400 int iErr)401 {402 struct iocblk *pIOCBlk = (struct iocblk *)pMBlk->b_rptr;403 404 pMBlk->b_datap->db_type = M_IOCNAK;405 pIOCBlk->ioc_count = cbData;406 pIOCBlk->ioc_error = iErr;407 qreply(pWriteQueue, pMBlk);408 }409 410 /* This does not work like the real version, but does some sanity testing411 * and sets a flag. */412 static inline int miocpullup(mblk_t *pMBlk, size_t cbMsg)413 {414 struct iocblk *pIOCBlk = (struct iocblk *)pMBlk->b_rptr;415 416 if (pIOCBlk->ioc_count == TRANSPARENT)417 return EINVAL;418 if ( !pMBlk->b_cont419 || pMBlk->b_cont->b_wptr < pMBlk->b_cont->b_rptr + cbMsg)420 return EINVAL;421 pMBlk->b_flag = 1; /* Test for this to be sure miocpullup was called. */422 return 0;423 }424 425 393 /* API stubs with controllable logic */ 426 394
Note:
See TracChangeset
for help on using the changeset viewer.