~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201207201942

« back to all changes in this revision

Viewing changes to libguestlib/vmGuestLib.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-10-18 12:28:19 UTC
  • mfrom: (1.1.7 upstream) (2.4.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091018122819-00vqew6m0ztpqcqp
Tags: 2009.10.15-201664-1
MergingĀ upstreamĀ versionĀ 2009.10.15-201664.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
      void *_data;                                                              \
88
88
      GuestLibV3Stat _stat;                                                     \
89
89
                                                                                \
 
90
      (ERROR) = VMGuestLibCheckArgs((HANDLE), (OUTPTR), &_data);                \
 
91
      if (VMGUESTLIB_ERROR_SUCCESS != (ERROR)) {                                \
 
92
         break;                                                                 \
 
93
      }                                                                         \
90
94
      ASSERT(HANDLE_VERSION(HANDLE) == 3);                                      \
91
 
      (ERROR) = VMGuestLibCheckArgs((HANDLE), (OUTPTR), &_data);                \
92
 
      if (VMGUESTLIB_ERROR_SUCCESS != (ERROR)) {                                \
93
 
         break;                                                                 \
94
 
      }                                                                         \
95
95
      (ERROR) = VMGuestLibGetStatisticsV3((HANDLE), (STATID), &_stat);          \
96
96
      if ((ERROR) != VMGUESTLIB_ERROR_SUCCESS) {                                \
97
97
         break;                                                                 \
405
405
          * XXX: Maybe use another error code for this case where the host
406
406
          * product doesn't support this feature?
407
407
          */
408
 
         ret = VMGUESTLIB_ERROR_UNSUPPORTED_VERSION;
 
408
         ret = VMGUESTLIB_ERROR_NOT_ENABLED;
409
409
         break;
410
410
      } else if (hostVersion == 3) {
411
411
         /*
815
815
{
816
816
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
817
817
   VMGUESTLIB_GETFN_BODY(handle, error,
818
 
                                mhz, hostMHz,
819
 
                                GUESTLIB_HOST_MHZ);
 
818
                         mhz, hostMHz,
 
819
                         GUESTLIB_HOST_MHZ);
820
820
   return error;
821
821
}
822
822
 
843
843
{
844
844
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
845
845
   VMGUESTLIB_GETFN_BODY(handle, error,
846
 
                                memReservationMB, memReservationMB,
847
 
                                GUESTLIB_MEM_RESERVATION_MB);
 
846
                         memReservationMB, memReservationMB,
 
847
                         GUESTLIB_MEM_RESERVATION_MB);
848
848
   return error;
849
849
}
850
850
 
871
871
{
872
872
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
873
873
   VMGUESTLIB_GETFN_BODY(handle, error,
874
 
                                memLimitMB, memLimitMB,
875
 
                                GUESTLIB_MEM_LIMIT_MB);
 
874
                         memLimitMB, memLimitMB,
 
875
                         GUESTLIB_MEM_LIMIT_MB);
876
876
   return error;
877
877
}
878
878
 
899
899
{
900
900
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
901
901
   VMGUESTLIB_GETFN_BODY(handle, error,
902
 
                                memShares, memShares,
903
 
                                GUESTLIB_MEM_SHARES);
 
902
                         memShares, memShares,
 
903
                         GUESTLIB_MEM_SHARES);
904
904
   return error;
905
905
}
906
906
 
927
927
{
928
928
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
929
929
   VMGUESTLIB_GETFN_BODY(handle, error,
930
 
                                memMappedMB, memMappedMB,
931
 
                                GUESTLIB_MEM_MAPPED_MB);
 
930
                         memMappedMB, memMappedMB,
 
931
                         GUESTLIB_MEM_MAPPED_MB);
932
932
   return error;
933
933
}
934
934
 
955
955
{
956
956
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
957
957
   VMGUESTLIB_GETFN_BODY(handle, error,
958
 
                                memActiveMB, memActiveMB,
959
 
                                GUESTLIB_MEM_ACTIVE_MB);
 
958
                         memActiveMB, memActiveMB,
 
959
                         GUESTLIB_MEM_ACTIVE_MB);
960
960
   return error;
961
961
}
962
962
 
983
983
{
984
984
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
985
985
   VMGUESTLIB_GETFN_BODY(handle, error,
986
 
                                memOverheadMB, memOverheadMB,
987
 
                                GUESTLIB_MEM_OVERHEAD_MB);
 
986
                         memOverheadMB, memOverheadMB,
 
987
                         GUESTLIB_MEM_OVERHEAD_MB);
988
988
   return error;
989
989
}
990
990
 
1011
1011
{
1012
1012
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
1013
1013
   VMGUESTLIB_GETFN_BODY(handle, error,
1014
 
                                memBalloonedMB, memBalloonedMB,
1015
 
                                GUESTLIB_MEM_BALLOONED_MB);
 
1014
                         memBalloonedMB, memBalloonedMB,
 
1015
                         GUESTLIB_MEM_BALLOONED_MB);
1016
1016
   return error;
1017
1017
}
1018
1018
 
1067
1067
{
1068
1068
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
1069
1069
   VMGUESTLIB_GETFN_BODY(handle, error,
1070
 
                                memSharedMB, memSharedMB,
1071
 
                                GUESTLIB_MEM_SHARED_MB);
 
1070
                         memSharedMB, memSharedMB,
 
1071
                         GUESTLIB_MEM_SHARED_MB);
1072
1072
   return error;
1073
1073
}
1074
1074
 
1095
1095
{
1096
1096
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
1097
1097
   VMGUESTLIB_GETFN_BODY(handle, error,
1098
 
                                memSharedSavedMB, memSharedSavedMB,
1099
 
                                GUESTLIB_MEM_SHARED_SAVED_MB);
 
1098
                         memSharedSavedMB, memSharedSavedMB,
 
1099
                         GUESTLIB_MEM_SHARED_SAVED_MB);
1100
1100
   return error;
1101
1101
}
1102
1102
 
1123
1123
{
1124
1124
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
1125
1125
   VMGUESTLIB_GETFN_BODY(handle, error,
1126
 
                                memUsedMB, memUsedMB,
1127
 
                                GUESTLIB_MEM_USED_MB);
 
1126
                         memUsedMB, memUsedMB,
 
1127
                         GUESTLIB_MEM_USED_MB);
1128
1128
   return error;
1129
1129
}
1130
1130
 
1151
1151
{
1152
1152
   VMGuestLibError error = VMGUESTLIB_ERROR_OTHER;
1153
1153
   VMGUESTLIB_GETFN_BODY(handle, error,
1154
 
                                elapsedMs, elapsedMs,
1155
 
                                GUESTLIB_ELAPSED_MS);
 
1154
                         elapsedMs, elapsedMs,
 
1155
                         GUESTLIB_ELAPSED_MS);
1156
1156
   return error;
1157
1157
}
1158
1158