- case KERN_SUCCESS:
- return 0;
- case KERN_RESOURCE_SHORTAGE:
- /* could not allocate memory, or stackshot is actually bigger than
- * SANE_TRACEBUF_SIZE */
- return ENOMEM;
- case KERN_INSUFFICIENT_BUFFER_SIZE:
- case KERN_NO_SPACE:
- /* ran out of buffer to write the stackshot. Normally this error
- * causes a larger buffer to be allocated in-kernel, rather than
- * being returned to the user. */
- return ENOSPC;
- case KERN_NO_ACCESS:
- return EPERM;
- case KERN_MEMORY_PRESENT:
- return EEXIST;
- case KERN_NOT_SUPPORTED:
- return ENOTSUP;
- case KERN_NOT_IN_SET:
- /* requested existing buffer, but there isn't one. */
- return ENOENT;
- case KERN_ABORTED:
- /* kdp did not report an error, but also did not produce any data */
- return EINTR;
- case KERN_FAILURE:
- /* stackshot came across inconsistent data and needed to bail out */
- return EBUSY;
- case KERN_OPERATION_TIMED_OUT:
- /* debugger synchronization timed out */
- return ETIMEDOUT;
- default:
- return EINVAL;
+ case KERN_SUCCESS:
+ return 0;
+ case KERN_RESOURCE_SHORTAGE:
+ /* could not allocate memory, or stackshot is actually bigger than
+ * SANE_TRACEBUF_SIZE */
+ return ENOMEM;
+ case KERN_INSUFFICIENT_BUFFER_SIZE:
+ case KERN_NO_SPACE:
+ /* ran out of buffer to write the stackshot. Normally this error
+ * causes a larger buffer to be allocated in-kernel, rather than
+ * being returned to the user. */
+ return ENOSPC;
+ case KERN_NO_ACCESS:
+ return EPERM;
+ case KERN_MEMORY_PRESENT:
+ return EEXIST;
+ case KERN_NOT_SUPPORTED:
+ return ENOTSUP;
+ case KERN_NOT_IN_SET:
+ /* requested existing buffer, but there isn't one. */
+ return ENOENT;
+ case KERN_ABORTED:
+ /* kdp did not report an error, but also did not produce any data */
+ return EINTR;
+ case KERN_FAILURE:
+ /* stackshot came across inconsistent data and needed to bail out */
+ return EBUSY;
+ case KERN_OPERATION_TIMED_OUT:
+ /* debugger synchronization timed out */
+ return ETIMEDOUT;
+ default:
+ return EINVAL;