userlibandfileserver/fileserver/shostmassstorage/server/protocol/cmassstoragefsm.cpp
equal
deleted
inserted
replaced
319 @return TInt KErrCompletion if successful otherwise KErrNotSupported |
319 @return TInt KErrCompletion if successful otherwise KErrNotSupported |
320 */ |
320 */ |
321 TInt CMassStorageFsm::ConnectLogicalUnitL() |
321 TInt CMassStorageFsm::ConnectLogicalUnitL() |
322 { |
322 { |
323 __MSFNLOG |
323 __MSFNLOG |
|
324 __HOSTPRINT(_L("CMassStorageFsm::ConnectLogicalUnitL()")); |
324 TInt err = KErrNone; |
325 TInt err = KErrNone; |
325 for (;;) |
326 for (;;) |
326 { |
327 { |
327 err = ProcessStateL(); |
328 err = ProcessStateL(); |
328 if (err) |
329 if (err) |
338 @return TInt KErrCompletion if successful otherwise KErrNotSupported |
339 @return TInt KErrCompletion if successful otherwise KErrNotSupported |
339 */ |
340 */ |
340 TInt CMassStorageFsm::DisconnectLogicalUnitL() |
341 TInt CMassStorageFsm::DisconnectLogicalUnitL() |
341 { |
342 { |
342 __MSFNLOG |
343 __MSFNLOG |
|
344 __HOSTPRINT(_L("CMassStorageFsm::DisconnectLogicalUnitL()")); |
343 TInt err = KErrNone; |
345 TInt err = KErrNone; |
344 for (;;) |
346 for (;;) |
345 { |
347 { |
346 TInt err = ProcessStateL(); |
348 TInt err = ProcessStateL(); |
347 if (err) |
349 if (err) |
368 __MSFNLOG |
370 __MSFNLOG |
369 TMassStorage::TEvent event = TMassStorage::EEvCommandFailed; |
371 TMassStorage::TEvent event = TMassStorage::EEvCommandFailed; |
370 TRAPD(err, event = EntryL()); |
372 TRAPD(err, event = EntryL()); |
371 if (err == KErrNotSupported) |
373 if (err == KErrNotSupported) |
372 { |
374 { |
|
375 __HOSTPRINT(_L("FSM ProcessState returning with KErrNotSupported")); |
373 return KErrNotSupported; |
376 return KErrNotSupported; |
374 } |
377 } |
375 User::LeaveIfError(err); |
378 User::LeaveIfError(err); |
376 |
379 |
377 __HOSTPRINT1(_L("FSM event=%d"), event); |
380 __HOSTPRINT1(_L("FSM event=%d"), event); |
555 aFsm.SetState(TMassStorageState::EPreventRemovalState); |
558 aFsm.SetState(TMassStorageState::EPreventRemovalState); |
556 else |
559 else |
557 aFsm.SetState(TMassStorageState::EReadCapacityState); |
560 aFsm.SetState(TMassStorageState::EReadCapacityState); |
558 } |
561 } |
559 else |
562 else |
560 aFsm.SetState(TMassStorageState::EInquiryState); |
563 { |
|
564 __HOSTPRINT(_L("SBC is not set !!")); |
|
565 aFsm.SetState(TMassStorageState::EReadCapacityState); |
|
566 } |
|
567 |
561 return KErrNone; |
568 return KErrNone; |
562 } |
569 } |
563 |
570 |
564 |
571 |
565 TInt TNotReadyState::ScsiCommandFailed(CMassStorageFsm& aFsm) |
572 TInt TNotReadyState::ScsiCommandFailed(CMassStorageFsm& aFsm) |